One - One Code All

Blog Content

Git 回滚代码到某个提交 commit

Linux-Mac   2020-07-20 21:33:26

$ git reset --hard HEAD^ 回退到上个版本

$ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前

$ git reset --hard commit_id 退到/进到 指定commit的sha码


强推到远程:

$ git push origin HEAD --force



上一篇:Mac OS X使用mdbtools访问导入mdb数据库到mysql
下一篇:git clone 指定的单个目录或文件夹

The minute you think of giving up, think of the reason why you held on so long.