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

Re: pushing changes to a remote branch

From
JHJan Hudec <bulb@ucw.cz>
Date
Jul 11, 2007, 19:34 UTC
Message-ID
<20070711193444.GD3069@efreet.light.src>
In-Reply-To
<a2e879e50707102044l864b9dcre5b6fa5893ff4803@mail.gmail.com>
On Tue, Jul 10, 2007 at 22:44:58 -0500, Sean Kelley wrote:
Show 5 quoted lines
> If you then do a push from that new_branch_name will it create a new
> branch on the remote?  I am struggling with just being able to add a
> remote.  Create a local branch that maps to the remote.  Then
> committing and pushing changes to the remote - all without creating a
> new branch on the remote.

git push takes a refspec, which is local-branch:remote-branch. So you can push from local branch of any name to remote branch of any other name. You can also define the relationships in the config, but you'll have to look up what exactly you should specify in the manuals (of git-push and git-config).

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Sean KelleyNext: Jan Hudec
Message 6 of 10 in “pushing changes to a remote branch”
  1. martin f krafftJul 10, 2007
  2. Jeff KingJul 10, 2007
  3. Brian GernhardtJul 10, 2007
  4. Jeff KingJul 10, 2007
  5. Sean KelleyJul 11, 2007
  6. Jan HudecJul 11, 2007
  7. Jan HudecJul 11, 2007
  8. Junio C HamanoJul 11, 2007
  9. Jan HudecJul 14, 2007
  10. Jan HudecJul 11, 2007

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.