Re: master and origin
- From
- Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
- Date
- Oct 29, 2006, 21:29 UTC
- Message-ID
- <4d8e3fd30610291329n7fe59873r87cbee9ccbd4b720@mail.gmail.com>
- In-Reply-To
- <200610292219.21823.jnareb@gmail.com>
On 10/29/06, Jakub Narebski <jnareb@gmail.com> wrote:
Show 8 quoted lines
> > There is still one thing I don't understand, if I pull the git or > > kernel repository all the local branches are updated according to the > > remote branches, right? If I'm hacking on master what will happen to > > my local changes? > > With the default setup (git clone without --use-separate-remote), then > all local branches are updated according to remote branches... with the > exception of remote 'master' branch which updates local 'origin' branch.
OK, I see.
Show 5 quoted lines
> pull = fetch + merge, so if you pull when you are on your local 'master' > branch (and 'master' branch is first in the .git/remotes/origin file I think) > you would fetch remote 'master' into local 'origin' and merge what you > have in 'origin' into your 'master' (or merge remote 'master' into > your local 'master' if you want to think like that).
So in this case, there is a difference between doing my local development under master or myownlocalbranch. Right? I mean, if I do my own development under master and I pull, the master branch will include origin and my local changes. Corret? While if I work in my local branch the datas are not modified with a pull, because pull will update only the local copy of the remote branch. Correct?
Show 5 quoted lines
> If you have uncommitted changes git would probably refuse the merge. > If you made changes to one of the tracking branches (e.g. 'next' or > 'origin'), git would refuse to fetch into this branch (unless forced). > > HTH
It does, a lot!
Ciao,
-- Paolo http://docs.google.com/View?docid=dhbdhs7d_4hsxqc8 Non credo nelle otto del mattino. Però esistono. Le otto del mattino sono l'incontrovertibile prova della presenza del male nel mondo.