RE: Simple shortcut for "git push --set-upstream origin newBranchName"
- Date: Fri, 31 May 2019 15:13:21 +0000
- From: Cliff Schomburg <clisc@xxxxxxxxxxxxx>
- Subject: RE: Simple shortcut for "git push --set-upstream origin newBranchName"
Thanks, Patryk. It's always nice to see the feature I want is already implemented! 😊
From: Patryk Obara <dreamer.tan@xxxxxxxxx>
Sent: Friday, May 31, 2019 11:05 AM
To: Cliff Schomburg <clisc@xxxxxxxxxxxxx>; git@xxxxxxxxxxxxxxx
Subject: Re: Simple shortcut for "git push --set-upstream origin newBranchName"
On 31/05/2019 16:56, Cliff Schomburg wrote:
> Wow, I did not see that in the man pages... but I see it now. Thanks!
> So I guess I would change my ask to this:
> "git push -u"
> Should default to "origin branch" if no parameters are provided.
I think most people will agree, considering it already works this way :)
The default behaviour of git push changed in Git 2.0, perhaps you were reading some old tutorial. You can configure it to match your preferences by changing push.default value in your git config: