美文网首页
【git】切换commit

【git】切换commit

作者: 印比八方来 | 来源:发表于2018-10-07 09:08 被阅读0次

项目误改后,想回到上一次的commit。

1.查看commit

git log

显示如下:

commit f755647f756cc4a52e3a4e36c149d86091f6a9fa
Author: apple weinan.di@jimaisong.com
Date: Mon Jan 11 11:29:17 2016 +0800
DWN
commit b300ee580f1f2b92a70d3ff8a373473a8f845463
Author: apple weinan.di@jimaisong.com
Date: Tue Dec 29 17:16:06 2015 +0800
DWN

2.切换commit

#xxx为log的标识
git reset --hard xxx

相关文章

  • 【git】切换commit

    项目误改后,想回到上一次的commit。 1.查看commit 显示如下: commit f755647f756c...

  • Git命令行

    Git相关操作 简单操作 提交:git commit 创建分支:git branch bugFix 切换分支:gi...

  • git系列4-保存到暂存区

    git stash然后就可以切换分支git stash pop 这样就可以不commit也切换分支

  • tag

    git tag 在某个commit 上打tag 删除tag 切换tag

  • 你可能在找的git操作

    还原单个文件 撤回commit提交(不丢失代码) git reset --soft HEAD^ git切换分支 查...

  • Git常用指令汇总

    提交到版本库:git commit 切换到新分支:git checkout -b newBranch 合并分支:g...

  • GIT常用的简单指令

    创建新的分支:git branch namegit commit【记得提交】 切换当前操作的分支:git chec...

  • Git 切换分支:Please commit your chan

    Git 切换分支的时候遇到提示:Please commit your changes or stash them ...

  • 2019-07-12

    Git使用笔记 0、先将工作分支的内容提交 git add . git commit -m "说明文字" 1、切换...

  • Git command

    版本切换 切换到某次提交的版本 git reset --hard commit_id 查看日志 查看日志 gi...

网友评论

      本文标题:【git】切换commit

      本文链接:https://www.haomeiwen.com/subject/zgnkaftx.html