RE: Simple shortcut for "git push --set-upstream origin newBranchName"
- From
- Cliff Schomburg <clisc@microsoft.com>
- Date
- May 31, 2019, 14:45 UTC
- Message-ID
- <BN8PR21MB1156F7F3E7EFF9C8A60F33D0B7190@BN8PR21MB1156.namprd21.prod.outlook.com>
- In-Reply-To
- <BN8PR21MB1156DA1893F64814F1BE8709B7180@BN8PR21MB1156.namprd21.prod.outlook.com>
Resending as plain text
From: Cliff Schomburg Sent: Thursday, May 30, 2019 6:29 PM To: git@vger.kernel.org Subject: Simple shortcut for "git push --set-upstream origin newBranchName"
Hi all,
This is more of a suggestion than a bug report.
I create new topic branches quite frequently and push them into the remote repo (origin).
It's a bit of a hassle to type "git push -set-upstream origin newBranchName" each and every time I want to push a new branch.
I'm proposing a shortcut for this command. Perhaps "git push -default" or "git push -new-branch" which could be shortened to "git push -d" or "git push -nb" or something.
Based on the man-page for push, it looks like this could be an alias for: "git push -set-upstream origin HEAD" In which case HEAD should always be the current branch name.
Thoughts? Concerns?
Thanks, Cliff