Accept all merge conflicts in git

I try to merge and there are a lot of conflicts. These are all generated files, so I want to say: "ignore all merge conflicts and check everything in your own repo."

I tried

git checkout . --ours
git add -A
git com -a

This gives me an error, although due to the fact that there are still files in the "unmerged paths" bucket. How can I handle this?

Thank!

+5
source share
2 answers

Git - , , . , -f style git add, , , , , :

add-unmerged = \
    "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"

: "git add" $EDITOR, edit-unmerged, !

+5

:
.gitattributes, (, , )

* merge=keepMine

( , )

:

[merge "keepMine"]
        name = always keep mine during merge
        driver = keepMine.sh %O %A %B

. " git, ?" .

+4

All Articles