Git: How to Solve Error: Please commit your changes or stash them before you merge.

When the same file code is modified by the local branch and the remote branch, a file conflict will occur when the code of the remote branch is pulled

This error occurs Please commit your changes or stash them before you merge.

 

You can store the current content first, and git stash can store the current content in the stack

git stash and then git pull the new code

Then put out the content stored in the stack, git stash pop 

 

git stash list can view the list in the temporary storage stack

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *