Conflict scenarios:
There is a file student.py on the master branch.
Add a new dev branch to master
Modify the file student.py on the Dev branch. Add function def d ():, and commit;
Modify the file student.py on the master branch. Delete Function def a ():, and commit;
To merge the Dev branch on the master branch, Git prompts for conflicts such as:
Cause Analysis:
The file student.py has been modified on both the master and dev branches, causing the merge to be an error, for specific reasons
Http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/ 001375840202368c74be33fbd884e71b570f2cc3c0d1dcf000
Workaround:
Check for conflicting reasons, git command for git status
The image is displayed on Eclipse, the red file is a conflict file, open the red file, see the conflict details, such as:
Need to manually handle the content between <<<<<<< HEAD >>>>>>> Refs/heads/dev, manually merging the code, removing the <<< <<<< HEAD >>>>>>> Refs/heads/dev These two lines of content will then be processed after the student.py file is on the add to Index,eclipse as action But the red disappears after success, then the commit push.
We
Resolve Git branch merge conflicts in Eclipse