Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of git conflict

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report