git merge -s remote ?

September 23, 2008 – 22:51

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?

  • Pat Notz
  • Andrey Khavryuchenko

    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…

  • Andrey Khavryuchenko

    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 :(

  • Andrey Khavryuchenko

    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.

  • http://www.soe.ucsc.edu/~luca Luca de Alfaro

    Hi Andrey,

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

    Luca

  • http://www.soe.ucsc.edu/~luca Luca de Alfaro

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