Git Version Control Cookbook - Second Edition
by Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
How it works...
For every movement of the HEAD pointer in the repository, Git stores the commit pointed to and the action for getting there. This can be commit, checkout, reset, revert, merge, rebase, and so on. The information is local to the repository and is not shared on pushes, fetches, and clones. Using the reflog command to find the lost commits is fairly easy if you know what you are searching for and the approximate time when you created the commit you are searching for. If you have a lot of reflog history, many commits, switching branches, and so on, it can be hard to search through the reflog command due to the amount of noise from the many updates to HEAD. The output of the reflog command can be a lot of options and, among them, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access