Re: Workflow example for remote repository use of GIT

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Tuesday, November 28, 2006 - 12:18 pm

Sean Kelley wrote:


This conflicts a bit with later "Create a topic branch" statement.
The statement should be I think twofold: "Never work out of tracking
branches" (if you use separate remotes, git takes care of that for
yourself), and for typical workflow "Always work out of master
or merge changes into master".
 
This of course deopends on the structure of your repo. For example,
how many development branches are there. Git repository uses four
development branches: 'maint' (maintenance, stable, bugfixes),
'master' (trunk, main development, stable), 'next' (development)
and 'pu' (proposed updates, a kind of topic branch digest).


It always is "merge into current branch".

Please read what this mean in git-pull(1):

    ?  A parameter <ref> without a colon is equivalent  to  <ref>:  when
       pulling/fetching,  so  it  merges  <ref>  into the current branch
       without storing the remote branch anywhere locally.

So what "git pull origin master" do is to fetch _single_ remote branch
'master' from remote (repository) 'origin' _without_ storing it anywhere
locally (with separate remotes it would be 'remotes/origin/master',
without separate remotes it would be 'origin'), and merge it into _current_
branch.

What you usually want to do, when you are on branch "master", is

  git pull origin

or even

  git pull


One might want to create topic branch off other commit than HEAD,
using

  git checkout -b <new topic branch name> <branch point>


Depending on your project policy, it might be "git commit -a -s",
i.e. add signoff line.


The same comment as above.

By the way, this is _not_ CVS, you can merge your topic branch first,
_then_ pull from origin.


I'd point out that '.' means current repository here.


Probably (and better) just "git push origin" if everything is set up
correctly.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Workflow example for remote repository use of GIT, Jakub Narebski, (Tue Nov 28, 12:18 pm)