Say I have this after attempting a merge and upon entering git status
:
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# added by them: myfile1.xhtml
# added by them: myfile2.xhtml
# added by them: myfile3.xhtml
... and I know I want to do this for each of those files:
git checkout --theirs myfile1.xhtml
git add myfile1.xhtml
... but there are many of them. How might I do them as a batch?
You can use the below commands to checkout multiples files on unmerged path
execute the below command to commit the above files
This checks out all unmerged files without specifying the directory:
Source
If your files are deeper than one directory (ie. there are subdirectories) and you want to selectively recursively choose all
their
files for a directory, then use the following:(from this page)
The solution for my case ended up being to simply use a wildcard in the directory path, since the files were grouped: