Re: 'git branch' when origin branch with same name exists
- From
- Philippe Vaucher <philippe.vaucher@gmail.com>
- Date
- Jun 19, 2012, 16:17 UTC
- Message-ID
- <CAGK7Mr41h3k=6S6HizAbL_n1Ma8KJkYQuqE6w1=G7DeNrbtLwQ@mail.gmail.com>
- In-Reply-To
- <4FE0A0C0.2080409@desrt.ca>
Show 7 quoted lines
>> This very much violates the distributed nature of Git. Everything >> is allowed, because it's *my* repository. > > > It is certainly allowed, as originally mentioned, with a --force option of some kind. > > It is only prevented by default because it is likely you are making a mistake...
I second that, way more often than not it *is* a mistake to create a branch with the same name as one in a remote. In the unlikely scenario where it is what you want, I think asking for a -f/--force is not too much.
I think the feature request is in sync with "git branch -d" refusing to delete an unmerged branch because it's unlikely that it's what you want, and forces you to use -D instead.
Philippe