一、远程分支代码拉取:
- git clone http://xxxxxxxxx
- cd folder
- git checkout -b branch origin/branch
- git pull origin
二、取消commit
git reset HEAD^
三、与上次commit合并
git commit --amend
git push --force origin branch //强制提交
四、把其他分支commit合并到新建分支
git cherry-pick 6e3596
五、处理冲突
- git checkout lp2
- git fetch && git rebase
- git checkout -b newbranch
- git cherry-pick xxx
- git push --set-upstream origin 旧分支 --force
六、删除分支
- git push origin --delete new_a //删除远程分支
- git branch -D //删除本地分支