Git报错的解决方案汇总

错误1:

error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.

解决方案:

https://stackoverflow.com/questions/15745045/how-do-i-resolve-git-saying-commit-your-changes-or-stash-them-before-you-can-me

错误2:

# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
no changes added to commit (use "git add" and/or "git commit -a")

解决方案:

https://stackoverflow.com/questions/7704480/why-does-git-commit-not-save-my-changes

错误3: 
error: failed to push some refs to
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方案:https://stackoverflow.com/questions/10298291/cannot-push-to-github-keeps-saying-need-merge

猜你喜欢

转载自www.cnblogs.com/expiator/p/9316318.html
今日推荐