How do you make an existing git branch track a remote branch?

Posted by Pat Notz on Stack Overflow See other posts from Stack Overflow or by Pat Notz
Published on 2009-02-06T15:14:04Z Indexed on 2010/06/01 2:33 UTC
Read the original article Hit count: 210

Filed under:

I know how to make a new branch that tracks remote branches. But how do I make an existing branch track a remote branch. I know I can just edit the .git/config file but it seems there should be an easier way.

EDIT It looks like this can't currently be done in a convenient way with the current (1.6.1.x) version of Git.

UPDATE Git version >= 1.7.0 supports this. See the accepted answer

© Stack Overflow or respective owner

Related posts about git