idea push 时 出现如下错误 Push to origin/master was rejected

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了idea push 时 出现如下错误 Push to origin/master was rejected相关的知识,希望对你有一定的参考价值。


在terminl 窗口输入


D:\code\yiwei>git pull

warning: no common commits

remote: Counting objects: 5, done.

remote: Compressing objects: 100% (3/3), done.

remote: Total 5 (delta 0), reused 0 (delta 0)

Unpacking objects: 100% (5/5), done.

From https://git.oschina.net/h5156/yiwei

 * [new branch]      master     -> origin/master

There is no tracking information for the current branch.

Please specify which branch you want to merge with.

See git-pull(1) for details.


    git pull <remote> <branch>


If you wish to set tracking information for this branch you can do so with:


    git branch --set-upstream-to=origin/<branch> master



D:\code\yiwei>git pull origin master

From https://git.oschina.net/h5156/yiwei

 * branch            master     -> FETCH_HEAD

fatal: refusing to merge unrelated histories


D:\code\yiwei>git pull origin master --allow-unrelated-histories

From https://git.oschina.net/h5156/yiwei

 * branch            master     -> FETCH_HEAD

Auto-merging .gitignore

CONFLICT (add/add): Merge conflict in .gitignore

Automatic merge failed; fix conflicts and then commit the result.


以上是关于idea push 时 出现如下错误 Push to origin/master was rejected的主要内容,如果未能解决你的问题,请参考以下文章

IDEA使用Git出现push to origin/master was rejected错误解决方案

关于在使用 sourcetree 进行代码 push 时, 出现的用户名或者密码提示错误 解决方法

为啥当 T=std::string custom Vector C++ 时在 push_back(T&&) 上出现 SIGSEGV 错误

IDEA拉取Git出现0x80092013问题解决

使用sourceTree向码云提交代码时 push 错误 (或认证失败)解决办法

push to origin/master was rejected错误解决方案