操作Git中出现的问题,记录

Posted Keep Moving!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了操作Git中出现的问题,记录相关的知识,希望对你有一定的参考价值。

错误一:error: failed to push some refs to ‘[email protected]:....." Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to

解决方法:1,先拉取下来

      git pull origin master

      2,再上传

      git push -u origin master

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

解决方法:git push -u origin master -f;(我个人是再次拉取代码居然拉下来了) 

 

 

 

 

 

 

 

 

 

 

(不断更新。。。。)

以上是关于操作Git中出现的问题,记录的主要内容,如果未能解决你的问题,请参考以下文章

巧用vscode编辑器 ,利用vscode可视化git跟踪git历史记录,简单实现git日常操作

巧用vscode编辑器 ,利用vscode可视化git跟踪git历史记录,简单实现git日常操作

巧用vscode编辑器 ,利用vscode可视化git跟踪git历史记录,简单实现git日常操作

巧用vscode编辑器 ,利用vscode可视化git跟踪git历史记录,简单实现git日常操作

巧用vscode编辑器 ,利用vscode可视化git跟踪git历史记录,简单实现git日常操作

git使用小记:利用git bisec二分法查找定位bug问题