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

Tracking branches and pulling on remote

From
MMaaartin <grajcar1@seznam.cz>
Date
Jan 5, 2011, 00:58 UTC
Message-ID
<loom.20110105T013525-413@post.gmane.org>

1. I'm using git for couple of months and still don't get it. In a new repo a have two branches: master and X. I pushed both to the server, everything seems to work. However, there's origin/master but no origin/X in my repo. When I execute git fetch --all -v only master gets fetched. I've created an entry in the .git/config, no change. I've tried things like git branch --track X origin/X and all of them ends with an error message. Finally I've found out that git config --add remote.origin.fetch refs/heads/X:refs/remotes/origin/X seems to do it, was it right?

2.
I'd like to do some (at least for now) private changes on a foreign project. The 
ideal way I think about would be the following:
- my local repo is linked to my own server (for backup purposes and for private 
cooperation with a college)
- the repo on my server is linked to the github hosting the project
Now, I'd need to do something like
ssh myserver git fetch
and everything would be fine. I can do it this way, but I'd prefer something like
git remote fetch
or even
git fetch --remote-too
which would first make my server fetch from its origin and then my local repo 
fetch from my server. Is there such a thing? Would you recommend me doing it in 
a different way?
Next: Jeff King
Message 1 of 4 in “Tracking branches and pulling on remote”
  1. MaaartinJan 5, 2011
  2. Jeff KingJan 5, 2011
  3. Maaartin-1Jan 5, 2011
  4. Jeff KingJan 5, 2011

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.