I'm merging two branches and getting so many merge conflicts like
CONFLICT (add/add): Merge conflict in pika/static/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
Auto-merging pika/static/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
that they do not fit into my putty terminal. So I aborted the merge and run some git diff commands.
git diff origin/dev-kasitesivu_py_3.7..origin/dev-kasitesivu -- pika/static/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
diff --git a/pika/static/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js b/pika/static/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
old mode 100644
new mode 100755
For a huge amount of files the only change seems to be mode as above (I don't know what it means). I tried to copy the files from the directory running the branch that I want to merge, but git status did not show anything changed. Neither does linux diff-commad.
How can I resolve the conflicts ?
CodePudding user response:
The linux diff command compares file lines. i.e. the contents of the file. Your conflict is one of file permissions. You must select which permissions the files actually need to have. 755 is usually set on directories, but may have been set on the files in your case, by some other process or perhaps a sgid sticky bit.
You should be able to resolve your issue by setting the file permissions on the affected files to the permissions in old mode
. Like:
for x in those_files; do chmod 0644 $x; done
Or something of that nature.