git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Simple shortcut for "git push --set-upstream origin newBranchName"

From
CSCliff 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

Next: Patryk Obara
Message 1 of 7 in “RE: Simple shortcut for "git push --set-upstream origin newBranchName"”
  1. Cliff SchomburgMay 31, 2019
  2. Patryk ObaraMay 31, 2019
  3. Cliff SchomburgMay 31, 2019
  4. Patryk ObaraMay 31, 2019
  5. Cliff SchomburgMay 31, 2019
  6. Cliff SchomburgJun 3, 2019
  7. Denton LiuMay 31, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.