Git报错- 【refusing to merge unrelated histories】
To git@service1:/srv/Service/.gitremote: error: You can set 'receive.denyCurrentBranch' configuration variable to!refs/heads/master:refs/heads/master[remote rejected] (branch is currently ...
·
To git@service1:/srv/Service/.git
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
error: failed to push some refs to 'git@192.168.1.220:/srv/Service/.git'
本地
—— git pull origin master –allow-unrelated-histories
远程
vim .git/config
[receive]
denyCurrentBranch = ignore
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献1条内容
所有评论(0)