What should I do if there is a conflict during git pull?

For example, a certain line of code in a file you modified is modified and submitted by someone else. This line of your local code will conflict with the code of the pull. At this time, there will be a conflict prompt when you pull, which files are your local If there is a modification, you need to stash first.
At this time, there are two ways to solve the conflicts caused by git pull.
Method 1: Follow the prompts and use git stash to keep the work site. After git pull, use git stash pop to restore the work site. Your original modifications will be restored.
Method 2: Switch back to the master branch and use git pull, modify the files on your own branch and merge them into the master branch
when you push the master branch

Guess you like

Origin blog.csdn.net/qq_36875803/article/details/110597249