我刚刚在一台服务器上安装了Gitolite,所以我推进的任何存储库都应该是裸存储库,我甚至进入了repo目录,然后运行 git init --bare
在它们中确保它们是裸露的,但是当我尝试将它们推入它们时,我仍然会收到以下错误消息:
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'.
我甚至跑了 git config receive.denyCurrentBranch ignore
尝试让它只是推入远程仓库,但错误仍然出现。
我不确定我在这里做错了什么。
1
检查此链接: bitflop.com/tutorials/git-bare-vs-non-bare-repositories.html - 它解释了裸露和非裸露回购之间的区别。
—
Meetai.com
更新评论中发布的链接URL bitflop.dk/tutorials/...