On Fri, 14 Dec 2012 07:02:11 -0800
lei yang <yanglei.f...@gmail.com> wrote:

> I use below command to add a remote git's branch  to local branch
> git fetch g...@github.com:leiyang/git_testA.git  master:local
> The question is: if remote tree's "master" branch update, how could I
> update local tree's "local" branch to sync with remote tree's
> "master"?

You can do this by running precisely the same command: *creating* a
local branch is just a special case of fetching, where that local
branch does not yet exist.  If the target reference exists, then Git
tries to update it by downlading ony a minimal amount of history.

Note that your terminology is somewhat wrong: the term "tree" in Git
is used to mean the same thing as "branch".
So you should like something "if the branch (tree) `master' in the
remote repository gets updated, how do I update the local branch (tree)
`local' in my local repository?".


Reply via email to