I tried to merge a file in the command line using Git, when an error message appeared telling me the merge was aborted.
I thought that was the end of it, but then I
All of the answers are right but if you want to Autoremove all conflict marks & want to autochange the files to keep HEAD , then You can create your own bash script like :-
Example Script:
# vim /usr/sbin/solve.git
(Append Following)
#!/bin/bash
for f in $(grep -Rl '^>>>>>>> ' --include="*.php" --include="*.css" --include="*.js" --include="*.html" --include="*.svg" --include="*.txt" .)
do
sed -i -e '/^=======/,/^>>>>>>> /d' -e '/^<<<<<<< /d' $f
sed -i -e '/^>>>>>>> /d' $f
echo "$f Fixed"
done
git add . ; git commit -am "[+] Resolved on `date` from `hostname` by `whoami`" --no-verify
# chmod 755 /usr/sbin/solve.git
& just run it in your GIT repo/path to resolve:
$ cd
$ solve.git
Notice:- Above mentioned file extensions are php,css,js,html,svg & txt.