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.