- 此问题已在此处有答案**:
Cannot push to GitHub - keeps saying need merge(31答案)
3天前关闭。
我的组织只将存储库创建权限授予管理人员,说服他们创建一个存储库需要时间和精力。当他们这样做时,他们通常使用默认选项repo初始化为.gitignore
文件。这使我无法简单地使用
git remote set-url origin git@bitbucket.org:.....
git push --set-upstream origin master
给我:
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
结尾为:
fatal: refusing to merge unrelated histories
注意:我想保持本地目录的完整性。
1条答案
按热度按时间8yoxcaq71#
只要用力一推,就足够了。