我在Github控制台上创建了新的Repo 在Android Studio中,已提交并尝试推送到远程,推送被拒绝。
在工作室中,我能够与github成功连接。
尝试用Android工作室Git拉,得到:
Git Pull Failed: fatal: refusing to merge unrelated histories
即使在git bash中也有这个:
>git push origin master<br/>
To https://github.com/XXXX.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/XXX.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.