Skip to content

Instantly share code, notes, and snippets.

@ytoney
Created March 19, 2014 09:05
Show Gist options
  • Save ytoney/9638069 to your computer and use it in GitHub Desktop.
Save ytoney/9638069 to your computer and use it in GitHub Desktop.
找回commit之后 fetch后丢失的code
1、git reflog show (找到第一列类似4d5579a这样的id)
2、git cherry-pick 4d5579a
如果2不能实现,继续操作,
3、git status (查看是否有修改)
4、git reset --hard(删除没用的修改)
5、git cherry-pick 4d5579a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment