You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gerhard Holzinger edited this page Apr 29, 2016
·
3 revisions
A loose collection of magical linux shell stuff that might come in handy
Find and open all files which need a manual merge conflict resolution
We can split our task into smaller, easier tasks. We start from the set of all files and narrow our selection down until we get the set of files that meet the above stated criterion.
Find all files in our repository (that's kind of dumb, but we do it anyway)
Search all of the files we just found for a typical sequence generated by git to indicate a merge conflict, such as <<<<<<< HEAD
Extract the proper file names. grep gives us an output like this Path/File:Line_containing_search_pattern. Thus, we need to extract the full path to the file, i.e. everything prior to the colon.
Open the corresponding files with an editor of choice.
The following command, or rather chain of commands, does exactly what we just stated.