Changes

Jump to navigation Jump to search
308 bytes added ,  19:15, 28 April 2013
→‎Messed up branches: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg30844.html
Line 318: Line 318:  
"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.
 +
 +
A merge commit has two parent commits (leaving aside octopus commits). If you are not happy with the results of the merge, usually you want to revert
 +
back to the parent that was on your branch. The reflog can be useful for checking this, but usually the parent of the botched merge on your branch is HEAD^.
    
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
 
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

Navigation menu