git merge -s remote ?

September 23, 2008 – 10:51 pm

Sometimes I spend considerable time resolving merge conflicts between git branches that’s absolutely bogus.

What I need is just “take a remote branch content and shut up”.

But despite there is -s ours there’s no -s remote.

What I’m missing?

  1. 6 Responses to “git merge -s remote ?”

  2. Check out this Question on Stack Overflow:

    http://stackoverflow.com/questions/101752/aborting-a-merge-in-git

    And this post:

    http://marc.info/?l=git&m=121637513604413&w=2

    By Pat Notz on Sep 24, 2008

  3. Thanks, Pat!

    I’ve not thought about git reset solution despite daily using it (in buildbot).

    Will try to see how it lives with svn-tracking branch…

    By Andrey Khavryuchenko on Sep 24, 2008

  4. Pat,

    Ok, this doesn’t work.

    git-svn immediately looses it’s track of remote svn branch:

    $ git checkout svn
    Switched to branch "svn"
    $ git reset --hard master
    HEAD is now at 1d306d1 - ticket:50 deployed
    $ git svn rebase
    Unable to determine upstream SVN information from working tree history
    

    Oops :(

    By Andrey Khavryuchenko on Sep 24, 2008

  5. Note to myself.

    If you get

    Unable to determine upstream SVN information from working tree history
    

    then finding the commit hash of last svn commit (via git svn find-rev) and reseting to it (git reset --hard) helps.

    By Andrey Khavryuchenko on Sep 24, 2008

  6. Hi Andrey,

    I have your exact problem. Did you find a solution? Many thanks,

    Luca

    By Luca de Alfaro on Nov 6, 2008

  7. Found a solution. See http://docs.google.com/Doc?id=dct27ngc_86gqtpprmk Best, Luca

    By Luca de Alfaro on Nov 6, 2008

Post a Comment