threads / discuss / 30281

Adding a new option to git-push: --(no-)create-branch

Subject: Adding a new option to git-push: --(no-)create-branch

## tl;dr

3 messages between Apr 18, 2012 and Apr 19, 2012.

replies: 2people: 2as markdown or json

Rob Hoelz· Apr 18, 2012, 22:03 UTC · lore
Hello Git developers and users,
When I use Git, I tend to specify my branches explicitly.  For example:
git push origin master:master
However, I will often make a typo like this:
git push origin master:msater

I was thinking that it would be nice for git to support a new option/config value: --no-create-branch (push.createbranch). This configuration variable would forbid git from creating new remote branches, unless overriden with --create-branch.

Does anyone think this would be worth implementing? I'd like to take the pulse of the community before I start making any modifications.

Thanks, Rob Hoelz

Junio C Hamano· Apr 19, 2012, 00:46 UTC · re: Rob Hoelz · lore

Re: Adding a new option to git-push: --(no-)create-branch

Rob Hoelz <rob@hoelz.ro> writes:
> However, I will often make a typo like this:
>
> git push origin master:msater
Why isn't "git push origin master" explicit enough?
Rob Hoelz· Apr 19, 2012, 06:40 UTC · re: Junio C Hamano · lore

Re: Adding a new option to git-push: --(no-)create-branch

I suppose it would be...I may just need to retrain my fingers! =)

On Wed, 18 Apr 2012 17:46:53 -0700 Junio C Hamano <gitster@pobox.com> wrote:

Show 8 quoted lines
> Rob Hoelz <rob@hoelz.ro> writes:
> 
> > However, I will often make a typo like this:
> >
> > git push origin master:msater
> 
> Why isn't "git push origin master" explicit enough?
> 

← back to recent threads