How to merge all files manually in Git?

后端 未结 7 2021
遥遥无期
遥遥无期 2021-01-30 01:30

I want to merge all files manually with meld or any other diff tool, how can I do this with Git?
When I run git mergetool it says no

7条回答
  •  伪装坚强ぢ
    2021-01-30 01:48

    I pick strategy ours (it exist also as a pick in TortoiseGit), after doing a manual diff where you have brought-in changes you wanted manually.

    From: https://git-scm.com/docs/merge-strategies

    The merge mechanism (git merge and git pull commands) allows the backend 'merge strategies' to be chosen with -s option. Some strategies can also take their own options, which can be passed by giving -X arguments to git merge and/or git pull.

    ours

    This resolves any number of heads, but the resulting tree of the merge is always that of the current branch head, effectively ignoring all changes from all other branches. It is meant to be used to supersede old development history of side branches. Note that this is different from the -Xours option to the 'recursive' merge strategy.

    What Bitbucket see later however is a mystery to me, it recognise the commit as merge but fail to actually merge the branch (does not solve a pull-request) - probably Bitbucket guru could help on this issue, I can not even give you any logs/error messages since I do not have that visibility - git/TortoiseGit does not complain at all though.

提交回复
热议问题