Git報錯-refusing to merge unrelated histories

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 '[email protected]:/srv/Service/.git'

本地
—— git pull origin master –allow-unrelated-histories
遠程

vim .git/config
[receive]
denyCurrentBranch = ignore

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章