错误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

先执行git add 操作,然后才能执行git commit操作

错误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

错误4:

Local changes were not restored
Before update your uncommitted changes were saved to stash.
Update is not complete, you have unresolved merges in your working tree
Resolve conflicts, complete update and restore changes manually.

解决方案:https://www.jianshu.com/p/bc06970cb605

错误5:

error: The following untracked working tree files would be overwritten by merge:
        .idea/junitgenerator-prj-settings.xml
Please move or remove them before you can merge.
Aborting

解决方案:

将提示中的文件,如上提示的是.idea/junitgenerator-prj-settings.xml,将这个文件删除。

然后再执行下面的操作:

git pull origin master
git add .
git commit -m "本次提交的名称"
git push origin master

错误6:

$ git push origin master

error: failed to push some refs to 'https://github.com/.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方法:想将本地仓库代码提交到远程仓库,必须获取和合并最新的远程仓库代码。先执行git pull操作,保持代码版本一致,然后再git push。

最新文章

  1. select、poll、epoll之间的区别总结[整理]
  2. Qt窗口添加鼠标移动拖拽事件
  3. webstorm 2016 激活(转)
  4. poj 2482 Stars in Your Window (线段树:区间更新)
  5. Windows Azure Storage图形界面管理工具
  6. 使用Merge Into 语句实现 Insert/Update
  7. robotframework笔记13
  8. Java基础知识强化之网络编程笔记03:UDP之UDP协议发送数据 和 接收数据
  9. 大数据笔记07:大数据之Hadoop的HDFS(特点)
  10. deep learning in nlp 资料文献
  11. web api (.NET 4.5)
  12. BZOJ 3402: [Usaco2009 Open]Hide and Seek 捉迷藏
  13. 允许Android随着屏幕转动的控制自由转移到任何地方(附demo)
  14. Entity Framework 6.x Code First 基础
  15. LitepalNewDemo【开源数据库ORM框架-LitePal2.0.0版本的使用】
  16. 莫烦keras学习自修第一天【keras的安装】
  17. poi对excel的基本读写操作
  18. 利用JavaFx开发RIA桌面应用-事件监听
  19. MySQL异步复制延迟解决
  20. hdu 1159 Common Subsequence (最长公共子序列 +代码)

热门文章

  1. linux系统之间共享文件(CentOS6)
  2. [例1.10]使用setw设置输出宽度的例子
  3. iOS笔记之线程
  4. mouseover、mouseout和mouseenter、mouseleave
  5. 解决maven install报错信息(Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile )
  6. flv格式的播放代码
  7. matlab 将一堆文件名读到一个文本里面windows版本里
  8. Oozie_04总结一下workflowf的运行流程【20161116】
  9. LG4777 【模板】扩展中国剩余定理(EXCRT)
  10. Testng优势