After rolling back to a previous commit in git using:
git checkout <commit hash>
and then perform a git log
, all my log entries after the commit I just checked out are missing.
How do I get a listing of all commits once I've checked out a previous commit? I need to checkout the latest and go forward in time.
git log
shows the log from the current HEAD. Assuming the branch you want to see the log of is "master", to see the "full" log again you can do either of the following:
Checkout the branch and then run git log:
git checkout master
git log
Pass a reference to git log
to use as the HEAD:
git log master
and then have a reference of "future" commits to checkout instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With