In a multi-partner project, the following issues occur after GIT pull Origin master finishes executing:
Auto-merging. Ds_store CONFLICT (content): Merge CONFLICT in. Ds_store Automatic merge failed;
The reason is. Files such as Ds_store need to be ignored when the project is submitted.
Ignore steps:
1, touch. Gitignore Create a file,
Open-e. Gitignore paste the configuration content to upload, and then save. (Content is https://www.gitignore.io/gitignore on the website of Mac os objective-c cocoapods Xcode can be obtained)
git Add.
Git commit
Then you want to use this globally. Gitignore
$ git config--global core.excludesfile ~/.gitignore
followed by the. gitignore file location. You can change it. But that configuration file must exist under that path.
2, manual or command line to delete the end. After Ds_store, execute the command:
Rm. Ds_store
git Add.
Git commit-a-M "Change content" or git commit-am is shorthand for the former
Git pull Origin Master
Git push Origin Master
After execution, other colleagues need to merge my code, and if a colleague has content submissions, execute the command:
git Add.
Git commit-a-M "Modified content"
Git pull Origin Master
Git merge Origin/master The following error occurred after executing this command:
Error:merge is isn't possible because you have unmerged files.
Hint:fix them up in the work tree, and then use ' Git add/rm '
Hint:as appropriate to mark resolution and make a commit.
Fatal:exiting because of an unresolved conflict.
After this error occurs, re-executes
git Add.
Git commit-a-M "SSSs"
Git pull Origin Master
git merge Origin/master
And then perform the following
Git push Origin Master
There will be no more on GitHub at this point. Ds_store the successful performance is: local have. Ds_store and Gitignore files on it, GitHub has. Gitignore No. Ds_store file.
Text/puppet (Jane book author)
Original link: http://www.jianshu.com/p/4f69c79b295f
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author".
(. Ds_store) prevent multiple people from committing code to a conflict on GitHub