RE: Simple shortcut for "git push --set-upstream origin newBranchName"
- Date: Fri, 31 May 2019 14:45:05 +0000
- From: Cliff Schomburg <clisc@xxxxxxxxxxxxx>
- Subject: RE: Simple shortcut for "git push --set-upstream origin newBranchName"
Resending as plain text
From: Cliff Schomburg
Sent: Thursday, May 30, 2019 6:29 PM
Subject: Simple shortcut for "git push --set-upstream origin newBranchName"
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.