[Omaha.pm] [OMG!Code] git merge, I love you

Michael Kolakowski mkolakow at gmail.com
Thu Jul 25 06:49:15 PDT 2013


>>For when my local copy is "old" and I'm "catching up" to something 
authoritative. 

Got it. When I want to merge from the authoritative version regardless of 
my changes, I do something like the following:

git merge --no-ff -s recursive -X theirs <remoteName> <branchName>

The -X theirs says to resolve any conflicts by simply using their copy. But 
of course we know there's more than one way to do it.


>>so I'm 'git flux' compatible (http://sartak.org/drafts/git-flux.html) 

Interesting. We've been using git-flow for our branching model ( 
http://nvie.com/posts/a-successful-git-branching-model/ ) and I have to say 
it's been pretty darn good. When merging in a feature branch, we delete it 
right away. There's no good reason to keep them around after you've merged 
them.

Michael



On Thursday, July 25, 2013 8:22:14 AM UTC-5, Jay Hannah wrote:
>
> On Jul 24, 2013, at 12:52 PM, Michael Kolakowski <mkol... at gmail.com<javascript:>> 
> wrote: 
> > Can you explain why you did a fast forward only merge? I almost always 
> do my merges/pulls as --no-ff in order to preserve history, especially when 
> it comes to branches. At least that's how I understood things to work. 
>
> I always use one of these two: 
>
> --no-ff    make damn sure I get an explicit commit. I always do this in 
> local branch merges so I'm 'git flux' compatible (
> http://sartak.org/drafts/git-flux.html) 
>
> --ff-only  make damn sure I don't get an explicit commit. For when my 
> local copy is "old" and I'm "catching up" to something authoritative. 
>
> "hey git: Don't guess or be clever -- I'm expecting X, so if X is not 
> possible just say so and exit without doing anything." 
>
> I don't know if this is Right, Wrong, or Indifferent...  :) 
>
> Discussing with Nick Nisi at Coworking Wednesday yesterday we talked 
> about: 
>
> > git remote add abw git at github.com:abw/Template2.git 
>
> 'upstream' might have been the "Correct" conventional name for that (not 
> 'abw'). 
>
> > git merge --ff-only abw/master 
>
> In that exact scenario 
>
>    git rebase abw/master 
>
> would have done the same thing. We think. Untested.  :) 
>
> "git is easy!"   lol 
>
> j 
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20130725/1d08dd51/attachment.html>


More information about the Omaha-pm mailing list