We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git reset HEAD~1 git reset HEAD~2 (撤回2次)
git add . git commit -m "some str" git push
git commit -am "some str" git push
git commit --amend -m "重新提交注释"
git add . git stash (把暂存区的代码放入到git暂存栈) git checkout name(切换到正确的分支) git stash pop(把git暂存栈的代码放出来)
git reset HEAD~1 (最近一次提交放回暂存区, 并取消此次提交) git stash (暂存区的代码放入到git暂存栈) git checkout (应该提交代码的分支) git stash pop (把git暂存栈的代码放出来) git checkout (切换到刚才提交错的分支上) git push origin 错误的分支 -f (把文件回退掉)
git log git cherry-pick **id (有冲突) git add . git cherry-pick --continue
git rebase -i [startpoint] [endpoint] (进入交互界面, 将p -> s) p, pick: 保留该 commit s, squash: 将该 commit 和 前面一个 commit 合并 git checkout -b temp (基于无名的临时分支创建temp分支) git checkout dev (切回dev分支) git rebase temp
git rebase master (基于开发分支合并主分支) git add . git rebase --continue git reabase --skip git rebase --abort (终止当前rebase操作)
还没add时,取消这次合并
git merge --abort
已经git add
git checkout 【行merge操作时所在的分支】 git reflog git reset --hard 【merge前的版本号 id】
git stash #将本地修改暂时存储起来 git stash list #查看暂存的信息 git stash pop #应用最近一次暂存的内容 git stash apply stash@{1} #应用指定版本的暂存内容 git stash clear #清空暂存栈
git reset --hard 1d7444 #回退到某个版本 git cherry-pick 626335 #将某次commit的更改应用到当前版本 git cherry-pick … git push origin HEAD --force #强制提交
The text was updated successfully, but these errors were encountered:
No branches or pull requests
commit 提交完怎么撤回
commit
Git 开发错分支了
只想把一个提交合并到其它分支上
git rebase
使用 rebase 和 merge 的基本原则
撤销merge操作
暂存命令stash使用
回退到某个版本并应用指定的几次提交
The text was updated successfully, but these errors were encountered: