From: Junio C Hamano Date: Tue, 13 Sep 2005 16:05:23 GMT Subject: Re: deleting a branch Message-ID: <7v4q8p3qd8.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <4326F2AE.50108@citi.umich.edu> Chuck Lever writes: > a couple of newbie questions. > > 1. how do i delete a branch? "rm -f .git/refs/heads/no-longer-needed". Make sure your working tree is not on that branch (i.e. .git/HEAD should not be pointing at it). I have not introduced "git branch -d no-longer-needed" because I think that should do a bit more than "rm -f". For example: - making sure you are not on that branch (obvious), - check if all changes on that branch are included in the master branch or some other branch (easy if we hardcode "master"; checking all other branches might be nicer but expensive). - otherwise tell the user this and that changes will be forever lost and get a confirmation before removing. > 2. is there a conventional place where branch description files reside? No, but somebody proposed a convention a couple of days ago.