On Wed, Apr 30, 2014 at 05:25:59PM -0500, Felipe Contreras wrote:
> Marc Branchaud wrote:
> > On 14-04-30 04:14 PM, Felipe Contreras wrote:
> > > What is wrong when `git pull` merges a fast-forward?
> > 
> > Nothing.  Everything.  It depends.
> It depends on what? I don't see how a fast-forward `git pull` could
> possibly have any trouble.
> > > The problems with `git pull` come when you can't do a fast-forward merge, 
> > > right?
> > 
> > Some of them, maybe most of them.
> Name one problem with a fast-forward merge.

At work, we have a workflow where we merge topic branches as
non-fast-forward, so that we have a record of the history (including who
reviewed the code), but when we want to just update our local branches,
we always want fast-forward:

  git checkout maintenance-branch
  # Update our maintenance branch to the latest from the main repo.
  git pull --ff-only
  git pull --no-ff developer-remote topic-branch
  git push main-repo HEAD

So there are times when fast-forward merges are the right thing, and
times when they're not, and as you can see, this depends on context and
isn't per-repository.

brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply via email to