可能重复工作:
Git push error '[remote rejected] master -> master (branch is currently checked out)'用自己的git仓库
我将安装自己的浏览器(一个git网库浏览器,旨在易于设置和升级,光在依赖关系上,并且使用起来很舒服),因为我的git和当前工作正常,但是我使用自己的git有很多麻烦。在我只使用github作为服务之前。现在,在我自己的webspace上,我们可以安装git并创建它。但是如果我在源代码上推送新的更改,我会收到后续消息。在我发送提交之前,并将文件添加到回购之前;但对主人的推动是不可思议的;只有以下信息才是答案。
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
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'.
我有没有想法你在说什么。这是什么“自己的观众”? – CharlesB
我已更新我的英语不好,希望这有助于。 – bueltge