1
大家好,感谢您提前查看本文并尝试提供帮助。Git with Cpanel - 无法推送
我想通过SSH在(namecheap)共享服务器上使用git与cpanel。 虽然我能克隆/拉(如果我上传文件并提交它们),但它不允许我从本地推送到远程回购。
我有以下错误:
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'.
我试图本地创建一个新的分支,以不推主站远程主为在这里的一些答案解释,对SO。也试过git init --bare
,似乎也没有工作。
任何帮助非常感谢,因为我失去了最后5个小时试图解决这个问题。谢谢。