1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Accessing a Lost Commit as a git til.

This commit is contained in:
jbranchaud
2015-05-03 10:04:38 -05:00
parent 5c6a8358fd
commit a833a257e9
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
# Accessing A Lost Commit
If you have lost track of a recent commit (perhaps you did a reset), you
can generally still get it back. Run `git reflog` and look through the
output to see if you can find that commit. Note the sha value associated
with that commit. Let's say it is `39e85b2`. You can peruse the
details of that commit with `git show 39e85b2`.
From there, the utility belt that is git is at your disposal. For
example, you can `cherry-pick` the commit or do a `rebase`.