FlightGear Git: Difference between revisions

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


=== Messed up branches ===
=== Messed up branches ===
"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.
If you've pushed a commit to a public repo and then it later turns out that the commit wasn't a good idea, then you want "git revert" which creates the
reverse patch for a given commit. However, if you make a real hash out of a public repo you may still want git reset.
Backing it out might be a bit tricky, but you can rename your messed up branch out of the way easily with git branch -m oldname newname.
Backing it out might be a bit tricky, but you can rename your messed up branch out of the way easily with git branch -m oldname newname.


Navigation menu