The solution of git conflict
This article mainly shows you the "git conflict resolution", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and study the "git conflict resolution" this article.
There are four ways: 1, use "git fetch origin master" to pull down the remote branch; 2, execute commands to manually merge conflicting contents; 3, use "git add xxx" and "git commit-m.." Commit the changes; 4. Execute the command to submit the changes to the remote branch. The operating environment of this tutorial: windows10 system, Dell G3 computer.
The cause of git conflict
Multiple developers use or manipulate the same file in git at the same time. Finally, when submitting commit and pushing push in turn, the first operation can be submitted normally, and later developers will report a conflict exception conflict when they want to perform pull (pull) and pull (push) operations.
The method of conflict Resolution by Git
1. Use git fetch origin master to pull down the remote branch
2. Use git merge origin master to manually merge conflicting contents, first merge the code and enter the comment information, then press esc, and then press shit+;, to enter wq to save and exit.
3. Use git add xxx and git commit-m "xxx" to submit changes
4. Use git push origin master to submit changes to the remote branch
The above is all the contents of this article entitled "Solutions to git conflicts". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!