From: Björn Steinbrink Date: Sat, 03 Jan 2009 12:20:01 GMT Subject: Re: git reset --hard superfluous? Message-ID: <20090103122001.GA20199@atjola.homenet> In-Reply-To: <20090103011319.GA24149@seberino.org> On 2009.01.02 17:13:19 -0800, chris@seberino.org wrote: > David > > git reset --hard > "resets" the current branch head. > > Is this equivalent to deleting the branch > and doing > > git branch ?? > > So "git reset --hard" is syntactic sugar and 'unnecessary' right? Deleting the branch also deletes the reflog, while using reset adds a new entry to the reflog. So returning the branch head to its previous state is pretty trivial if you used reset and might be pretty hard if you deleted the branch. HEAD's reflog should probably have the right entry as well, but chances are that it's hidden in a crapload of other entries, especially if you rebase often. Björn