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
更多推荐
已为社区贡献1条内容
所有评论(0)