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 logshows 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:
Pass a reference to
git logto use as the HEAD:and then have a reference of "future" commits to checkout instead.
If you want to see a log of the changes to Git references (e.g. branches and HEAD), use
git reflog.