Re: git branch --track to link existing local branch to remote?
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- May 25, 2010, 19:53 UTC
- Message-ID
- <20100525195303.GA8174@atjola.homenet>
- In-Reply-To
- <AANLkTinxohzZE6uinzYPIAx3iVjw7afDLsr9MPMUAvHj@mail.gmail.com>
On 2010.05.25 12:40:40 -0700, skillzero@gmail.com wrote:
> However, the branches aren't linked in the config file so I can't just > do git pull.
[...]
> So what I've had to do is create a temp branch, switch to it, do git > branch -f --track master origin/master, and then delete the temp > branch. Is there a better way?
With git v1.7.0 or newer: git branch --set-upstream master origin/master
Björn