From: Johannes Sixt Date: Wed, 02 Jul 2008 15:38:05 GMT Subject: Re: [PATCH] prevent checkout from creating branches that start with a dash Message-ID: <486BA0DD.5030608@viscovery.net> In-Reply-To: <20080702150128.GH26300@jukie.net> Bart Trojanowski schrieb: > It was previously possible to create a -f branch with git-checkout, which > could not be used or deleted. > > $ git checkout -b -f master > Switched to a new branch "-f" "-f" *is* a valid branch name and can be used and deleted: $ git checkout -b -f next Switched to a new branch "-f" $ git checkout next Switched to branch "next" Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits. $ git checkout -- -f Switched to branch "-f" $ git checkout next Switched to branch "next" Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits. $ git branch -d -- -f Deleted branch -f. -- Hannes