Git恢复之前版本的两种方法reset、revert(图文详解)
https://blog.csdn.net/yxlshk/article/details/79944535
git命令行下回退一个文件到上一个版本
https://blog.csdn.net/feinifi/article/details/85867008
IntelliJ IDEA下git版本回退,版本还原
https://blog.csdn.net/hehyyoulan/article/details/80005272
---------------------------------------------------------------------
回退之后,遇到其他问题,如再次提交文件灰遇到 head 的deatched的错误,提交不了
HEAD detached from e06ccf8 Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: pom.xml no changes added to commit (us
git status 可以看到是这个错误。
HEAD detached from e06ccf8
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
2020年2月16日
解决方案:
git checkout master
git commit -am 'modify'
git checkout master
根据提示,找到66eb3dc之类的id
git branch servicebranch 66eb3dc
成功。