为了账号安全,请及时绑定邮箱和手机立即绑定

Git Push错误:拒绝更新签出的分支

Git Push错误:拒绝更新签出的分支

Git
汪汪一只猫 2019-10-15 15:57:00
我已经解决了一些合并冲突,已提交然后尝试推送更改,并收到以下错误:c:\Program Files (x86)\Git\bin\git.exe push --recurse-submodules=check "origin" master:masterDoneremote: error: refusing to update checked out branch: refs/heads/masterremote: error: By default, updating the current branch in a non-bare repositoryremote: error: is denied, because it will make the index and work tree inconsistentremote: error: with what you pushed, and will require 'git reset --hard' to matchremote: error: the work tree to HEAD.remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable toremote: error: 'ignore' or 'warn' in the remote repository to allow pushing intoremote: error: its current branch; however, this is not recommended unless youremote: error: arranged to update its work tree to match what you pushed in someremote: error: other way.remote: error: remote: error: To squelch this message and still keep the default behaviour, setremote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.To C:/Development/GIT_Repo/Project ! [remote rejected] master -> master (branch is currently checked out)error: failed to push some refs to 'C:/Development/GIT_Repo/Project'有谁知道是什么原因导致此错误?
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 991 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信