git merge, keep both

后端 未结 2 860
庸人自扰
庸人自扰 2020-11-29 08:08

For merging I use this to \"keep mine\"

git merge -X ours foo

and this for \"keep theirs\"

git merge -X theirs foo
<         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 08:40

    What about this one?

    grep -v -e'^<<<<<<<' -e '^>>>>>>>' -e'=======' filename.txt > filename.tmp

    mv filename.tmp filename.txt

提交回复
热议问题