FlightGear Git: Difference between revisions

Jump to navigation Jump to search
→‎Messed up branches: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg30839.html
(→‎Messed up branches: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg30838.html)
(→‎Messed up branches: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg30839.html)
Line 311: Line 311:


=== Messed up branches ===
=== Messed up branches ===
It's worth experimenting with "git reflog" in situations like this. That tracks a list of HEAD references in strict chronological order
(i.e. what has HEAD been in the past, not what commits were done).
In cases where you've completely mucked up the revision history, you can look at this to see what you were doing before, recover the commit ID, and do a reset --hard to that.
"Backing out" is done with git reset --hard last_good_commit. Often the name of the last good commit is HEAD^, the last commit. However, after a botched
"Backing out" is done with git reset --hard last_good_commit. Often the name of the last good commit is HEAD^, the last commit. However, after a botched
merge it is good to verify that with git log or graphically with gitk.
merge it is good to verify that with git log or graphically with gitk.

Navigation menu