Quantcast
Channel: How to do 'git checkout --theirs' for multiple files (or all unmerged files) - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by kris for How to do 'git checkout --theirs' for multiple files (or all unmerged files)

$
0
0

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:

grep -lr '<<<<<<<' directory_name/ | xargs git checkout --theirsgit add directory_name/*

(From an article on handling merge conflicts.)


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>