Record your own use of git as a common error in the project management process and how to handle it
1.git Pull problem occurred
Git pull has many problems with remote branch files and local conflicts
Error Hint: Error:your local changes to ' C/ENVIRON.C ' would is overwritten by merge. Aborting.please, commit your changes or stash them before you can merge.
Translation: This means that there is a conflict between the updated content and the locally modified content, either by committing your changes or by temporarily storing the local changes first.
Treatment: 1. Save the local file $ git stash 2. Follow the new $ git pull 3. Restore saved content $ git stash pop [email protected]{0} return hint auto-merging c/environ.c CONFLICT (content): Merge CONFLICT in c/environ.c 4. Resolving conflicts, opening conflicting files where updated upst The content between Ream and ===== is the content of pull down, and the content between = = and stashed changes is locally modified. In this case, Git does not know what line of content is needed, so you have to decide what you want. After the resolution is completed, it can be submitted normally. If you have pulled down from the server and have merged with the local code and want to recall, you can use the git log command to view your commit log, using git reset--hard <commitID> for version fallback2.git push issue occursThere are 1 problems with git push uploads. The local file does not commit 2.commit after the push commit fails 1. The local file does not have a commit (this is rare) No code found ... Don't put it on. I believe that all the students can read. Local commit is OK.2.commit After the push submission failed, this is the point. Workaround: Back up the online files branch. Then the local file push-f just fine. This method is forced to update the remote branch. So it's a good idea to back up remote files
Git common operations and problem solving