From: Junio C Hamano Date: Mon, 10 Oct 2005 20:30:15 GMT Subject: Re: openbsd version? Message-ID: <7vll113yjs.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <864q7pdvcn.fsf@blue.stonehenge.com> merlyn@stonehenge.com (Randal L. Schwartz) writes: > Related question. I created "mybranch" to do the patch, but how > can I have my repository now forget that mybranch was ever made? > Is it sufficient to remove the branch link, and then type some "fsck" > operation? Removing non-current branch -- you may need to do -D instead of -d. $ git branch -d mybranch > That's also a question in general... how can I remove a commit, > knowing that I'd never refer to it again? Or is disk space so cheap > that it wouldn't make any difference anyway? Removing from the tip of the current branch: $ git reset HEAD^ Removing from the tip of non-current branch: $ git update-ref mybranch mybranch^