Personal blog of Jack Casey.
RSS icon Email icon Home icon
  • Git Tip

    Posted on June 30th, 2011 beetlefeet No comments
    When resolving conflicts you sometimes want to just take all changes from one side, discarding the other, especially in the case of binary files.

    In SVN we had "svn resolve <FILE> –accept=working/theirs".

    in GIT you must add one version of the file or other and then commit the merge.

    To keep the file as it was (keep 'ours'):
    git add <FILE>

    To use 'theirs' (accept all the incoming changes, throwing away all the local changes)
    git checkout –theirs — <FILE>
    git add <FILE>

    Then after resolving all conflicts:
    git commit