How do I get a remote tracking branch to stay up to date with remote origin in a bare Git repository?

Posted by Beau Simensen on Stack Overflow See other posts from Stack Overflow or by Beau Simensen
Published on 2011-01-15T08:22:17Z Indexed on 2011/01/15 14:53 UTC
Read the original article Hit count: 208

Filed under:
|
|
|

I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this:

git branch -t 0.1 origin/0.1

This seems to do what I need to do for that point in time. However, if I make changes to origin and then fetch with the bare repo, things start to fall apart. My workflow looks like this:

git fetch origin

It looks like all of the commits come in at that point, but my local copy of 0.1 is not being updated. I can see that the changes have been brought into the repository by doing the following:

git diff 0.1 refs/remotes/origin/0.1

What do I need to do to get my tracking branch updated with the remote's updates? I feel like I must be missing a step or a flag somewhere.

© Stack Overflow or respective owner

Related posts about git

Related posts about remote