git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Harning <harningt@gmail.com>
To: Peter Gordon <peter@pg-consultants.com>
Cc: git@vger.kernel.org
Subject: Re: Git workflow
Date: Mon, 10 Mar 2008 21:58:52 -0400	[thread overview]
Message-ID: <20080310215852.7f4d7ab5@shiva> (raw)
In-Reply-To: <1205152663.3470.12.camel@tigger>

On Mon, 10 Mar 2008 14:37:43 +0200
Peter Gordon <peter@pg-consultants.com> wrote:

> Hi.
> 
> There are a number of us working on a project. We each have a HEAD,
> and work on branches, using git-checkout -b MyPatch. When we have
> finished working on the branch, we move back to the HEAD, with 
> git-checkout master, do a 
> git-pull
> and then git-cherry-pick sha1.....
> 
> I have two questions. 
> 
> 1) Is this the normal way to work with git.
Since you always work on your own 'branch', you have no need to check
out a new branch to be independent of others.
If you 'do' work on your own branch, the easier way would be to do one
of the following:
a) git pull
b) Separate branches for separation..
  git checkout master
  git pull -- may cause a merge
  git merge <your branch> -- if you worked on your own branch..git pull
c) Get the latest changes and linearize history
  git fetch
  git rebase origin/master

a - Easiest and more sane
	If you want to work on your own branches you can always
	work on that branch and pull updates from the master
b - Might keep workflow simpler and follows your workflow without
cherry-picks
c - Might be good if you create a simple patch and don't care about the
history and haven't published the branch
> 
> 2) Also, we sometimes get a log of 
> Merge branch 'master' of git://sgit/MyProject which has no commits.
> Why does this happen?
git pull performs explicit merges if your repository is not at the
exact same point as another.  Depending on what has happened, there
might be no code changes, but the history is different (perhaps
out-of-order 'cherry-picks')

  reply	other threads:[~2008-03-11  2:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10 12:37 Git workflow Peter Gordon
2008-03-11  1:58 ` Thomas Harning [this message]
2008-03-11  5:15 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080310215852.7f4d7ab5@shiva \
    --to=harningt@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peter@pg-consultants.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).