Error on moving a GitHub repository into another repository

You have done most of the work. Now it's just about fixing the merge conflicts. Lets tackle it one by one.

CONFLICT (add/add): Merge conflict in README.md

This one is pretty straighforward. The README.md file has some conflict(s), which you can manually fix by editing the file and saving whatever is required in it. Make sure that you remove the lines with <<<<<<<, ======= and >>>>>>> in it which are used by Git to show the conflict. Onto the next one.

CONFLICT (add/add): Merge conflict in .DS_Store

The .DS_Store is created on Mac and you can view that by running ls -a, and should usually be ignored from source control by adding it to the .gitignore file at the root of the repo directory. Since it hasn't been done already, the conflict is occurring with that file too. So now you should first remove all occurrences of .DS_Store from your repo directory by running the below command at the root of the repo directory:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

Next, if you have a .gitignore file already, add a line with .DS_Store to the same. Otherwise, create and add the entry by the command at the root of the repo directory

echo .DS_Store >> .gitignore

Next just commit the changes with the usual

git commit -am "Commit message"

Then push the changes with

git push origin master

Work done!

Tags:

Github