无法与Bitbucket共享git repo

问题描述

我有一个本地本地存储库undeg Git。现在,我想将其推送到Bitbucket。

如果我只是设置远程

git remote add bitbucket <https://URL>

它说存储库不存在。

如果我首先从Bitbucket页面创建存储库,则

>git push --all bitbucket
To https://URL
 ! [rejected]        master -> master (non-fast-forward)
error: Failed to push some refs to 'https://URL'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

如果我愿意

>git pull bitbucket master
From https://URL
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

看起来像死胡同。

还有什么可以做的?

我不想先克隆空的存储库,然后再填充文件来作弊。我想将现有的存储库推送到Bitbucket。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)