User Tools

Site Tools


git:git_reflog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
git:git_reflog [2016/11/21 11:59] – created petergit:git_reflog [2019/11/29 15:06] (current) – removed peter
Line 1: Line 1:
-====== GIT - git reflog ====== 
  
-This log is updated when the HEAD gets updated.  This usually happens with: 
- 
-  * Switching branches 
-  * Pulling in new changes 
-  * Adding new commits 
-  * Rewrites to history 
- 
-This command will show you the history of your local repository.  If you performed a destructive command like reset and want to recover commits, you could find the hash of this commit with git-reflog. 
- 
-<code git> 
-git log --oneline 
-00617f7 add bacon file 
-baee97e add new feature 
-62f8afd did bug fix 
-ed937bb initial commit 
-</code> 
- 
-<code git> 
-git reset --hard 62f8afd 
-HEAD is now at 62f8afd did bug fix 
-</code> 
- 
-<code git> 
-git reflog 
-62f8afd HEAD@{0}: reset: moving to 62f8afd 
-00617f7 HEAD@{1}: commit: add bacon file 
-baee97e HEAD@{2}: merge new feature: Fast-forward 
-62f8afd HEAD@{3}: checkout: moving from new-feature to master 
git/git_reflog.1479729548.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki