Is it possible to somehow force git to use theirs merge strategy for a specific directory during a pull-out? But if conflicts arise in other places, let them give me the opportunity to resolve.

Now only this comes to mind: we make a hook that works after pull-out, and runs git checkout --theirs {моя директория}

    1 answer 1

    based on the answer: Simple tool to accept their file using git


    for partial automation, you can, for example, use aliases:

     $ git config --global alias.accept-ours = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --ours -- \"$@\"; git add -u -- \"$@\"; }; f" $ git config --global alias.accept-theirs = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --theirs -- \"$@\"; git add -u -- \"$@\"; }; f" 

    and if a conflict occurs after git pull for files / directories that should be ours , execute:

     $ git accept-ours -- файлы/каталоги ... 

    but for those that should be theirs :

     $ git accept-theirs -- файлы/каталоги ...