[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git repository and branches ?

From: Xavier Maillard
Subject: Re: Git repository and branches ?
Date: Sat, 23 Feb 2008 03:00:06 +0100
User-agent: Rmail in GNU Emacs on GNU/Linux

   Xavier Maillard <address@hidden> writes:
   >       git checkout -b lexbind origin/lexbind
   >    [After that, you can switch to your local lexbind branch by just
   >    using "git checkout lexbind"; to switch back to the trunk, use
   >    "git checkout master".]
   > Will my local git repository be able to "track" the activity of
   > the branch I am working. In short, will git-pull also fetch
   > branches?

   That command should set up a "tracking branch" by default (I just
   checked, and indeed --track is now the default; it didn't use to be,
   though, so be aware if you have an old version of git), which means
   that "git pull" will fetch and merge the current branch.

   [I'm a bit fuzzy on what exactly gets _fetched_ by default -- whether
   all branches from the origin remote, or only the origin branch
   corresponding to the current branch -- but I know only the current
   branch will be _merged_ when you do "git pull" or "git merge".  So
   after using "git checkout BRANCH" to switch to a new branch, it's a
   good idea to use "git pull" again to make sure it's up to date.]

Once again, thank you very much for your help. I tested it here
and it worked like a charm. The only drawback is that switching
from a branch to master and vice versa takes very long...

I can live with that though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]