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

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

From
Denton Liu <liu.denton@gmail.com>
Date
May 31, 2019, 15:11 UTC
Message-ID
<20190531151126.GA3465@archbookpro.localdomain>
In-Reply-To
<BN8PR21MB115693C381F65E97AB65FA18B7190@BN8PR21MB1156.namprd21.prod.outlook.com>
On Fri, May 31, 2019 at 02:56:12PM +0000, 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.  Thoughts?
I'll do you one better. You can run
	$ git push -u origin HEAD

and HEAD will mean the current branch, so you'll only need to specify the remote (in our case, origin).

Perhaps you could alias that to something like `git push-up`.
Show 17 quoted lines
> 
> Thanks,
> Cliff
> 
> -----Original Message-----
> From: Patryk Obara <dreamer.tan@gmail.com> 
> Sent: Friday, May 31, 2019 10:51 AM
> To: Cliff Schomburg <clisc@microsoft.com>; git@vger.kernel.org
> Subject: Re: Simple shortcut for "git push --set-upstream origin newBranchName"
> 
> On 31/05/2019 16:45, Cliff Schomburg wrote:
> > I'm proposing a shortcut for this command.
> 
> What's wrong with "$ git push -u origin branch"?
> 
> --
> Patryk Obara
Previous: Cliff Schomburg
Message 7 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.