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

how to push from repository with two tracking branches

From
GGelonida <gelonida@gmail.com>
Date
May 13, 2010, 09:09 UTC
Message-ID
<hsgfjn$onv$1@dough.gmane.org>
Hi,
I have a repository with two tracking branches ('master' and 'mybranch')

with only one tracking branch I can do git pull make_local_changes git commit -a git push

with two tracking branches I will be told off if the other branch has been updated meanwhile, so what I currently to do is:

# 'pull and fastforward mybranch' git checkout mybranch git pull git checkout master

# pull and commit and push as with one tracking branch git pull make_local_changes git commit -a git push

How can I do this more efficiently? after a pull to master (I just had to fast forward mybranch to remote/mybranch) Switching branches and pulling seems a little clumsy

N
Next: Jeff King
Message 1 of 3 in “how to push from repository with two tracking branches”
  1. GelonidaMay 13, 2010
  2. Jeff KingMay 13, 2010
  3. Thomas RastMay 13, 2010

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.