From b01c03b71eb6d24d48e8cc252366250953cd38eb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 1 Feb 2011 09:49:42 -0500 Subject: [PATCH] Give alternative method for rolling back history in Git notes. --- posts/Git/notes.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/posts/Git/notes.org b/posts/Git/notes.org index b0a544a..480ba99 100644 --- a/posts/Git/notes.org +++ b/posts/Git/notes.org @@ -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 -- 2.26.2