Give alternative method for rolling back history in Git notes.
authorW. Trevor King <wking@drexel.edu>
Tue, 1 Feb 2011 14:49:42 +0000 (09:49 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 1 Feb 2011 14:49:42 +0000 (09:49 -0500)
posts/Git/notes.org

index b0a544af586b1216d7fb1ece3c85fc5b925042d1..480ba996667c94fcce6a0590faf396c88574de09 100644 (file)
@@ -534,6 +534,13 @@ Note that this may remove some information from your =.git/config='s
 =[branch "master"]= entry.  You should save your earlier =.git/config=
 before doing it, and make any appropriate corrections afterwards.
 
+If you're just trying to roll back a branch a few commits, skip the
+above and try
+
+    : $ git reset --hard HEAD^
+
+or add however many =^= you need to get back to the last good commit.
+
 ** Git submodules, nesting/tracking sub-repositories.
 
 This is a nice way of grouping associated projects.  The submodules