Re: Simple shortcut for "git push --set-upstream origin newBranchName"
- From
Patryk Obara <dreamer.tan@gmail.com>
- Date
- May 31, 2019, 15:05 UTC
- Message-ID
- <ebc03b4e-daf8-d47f-94ca-a4a549589773@gmail.com>
- In-Reply-To
- <BN8PR21MB115693C381F65E97AB65FA18B7190@BN8PR21MB1156.namprd21.prod.outlook.com>
On 31/05/2019 16:56, Cliff Schomburg wrote:
Show 7 quoted lines
> 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:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushdefault
-- Patryk Obara