***取回已经提交的代码 git reset HEAD^

git can't merge 的处理
1.git status 确保status 为空,可以先提交
2.git reset HEAD^    取回已经提交的代码
3.git status 查看 此时提交代码已经都已经拿回
4.git stash -u 缓存所有代码
5.git status  此时应该为空
6.git log
7.git reset --hard HEAD^ 回退版本
8.git pull --rebase origin master 更新代码 与fetch 一样
9.git stash apply 合并自己stash的代码
10. git mergetool 解决冲突
11.git gui 提交代码 --commit
12.git push origin HEAD:refs/for/master

相关文章:

  • 2022-12-23
  • 2022-01-16
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-07-02
  • 2021-10-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-06-22
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案