When you update your code with GIT pull, you encounter the following problem:
Error:your local changes to the following files would is overwritten by merge: Please , commit Your changes or stash t Hem before you can merge. Aborting
This problem occurs because others have modified the xxx.php and submitted to the Repository, and you have modified the xxx.php, you have a git pull operation is a good conflict, the solution, in the above hints also said very clearly.
1, the modification of the local reservation modification method
1) Direct Commit local modification
2) via Git stash
Git stashgit pullgit stash pop
By using Git stash to restore the workspace to the last commit, and back up the local changes, you can then git pull, and after Git pulling is done, the git stash pops are applied to the current workspace with the previous local modifications.
Git stash: Backs up the contents of the current workspace, reads the content from the most recent commit, and makes the workspace guarantee consistent with the last commit. At the same time, save the current workspace content to the git stack.
Git stash pop: reads the last saved content from the Git stack and restores the workspace. Because there may be multiple stash content, the pop reads the content from the most recent stash and recovers it by using a stack to manage it.
Git stash list: Displays all the backups in the GIT stack and can use this list to decide where to recover from.
Git stash clear: Empty the git stack. Using graphical tools such as GITG, you will find out which nodes of the original stash have disappeared.
2, discard the modification of local modification method
git Reset--hardgit Pull
Error:your local changes to the following files would is overwritten by merge