Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 裸回购:并非所有参考文献都已推出_Git_Git Push_Git Pull_Git Remote - Fatal编程技术网

Git 裸回购:并非所有参考文献都已推出

Git 裸回购:并非所有参考文献都已推出,git,git-push,git-pull,git-remote,Git,Git Push,Git Pull,Git Remote,尝试将提交推送到裸远程存储库时,我收到以下错误: Push: Not all refs have been pushed. 'master' rejected (non-fast-forward) refusing to update checked out branch: refs/heads/master. By default, updating the current branch in a non-bare repository is denied, because it will

尝试将提交推送到裸远程存储库时,我收到以下错误:

Push: Not all refs have been pushed. 'master' rejected (non-fast-forward) 
refusing to update checked out branch: refs/heads/master. By default, updating 
the current branch in a non-bare repository is denied, because it will make 
the index and work tree inconsistent with what you pushed, and will require 
'git reset --hard' to match the work tree to HEAD.

You can set 'receive.denyCurrentBranch' configuration variable to 'ignore' or 
'warn' in the remote repository to allow pushing into its current branch; 
however, this is not recommended unless you arranged to update its work tree 
to match what you pushed in some other way.        

To squelch this message and still keep the default behaviour, set
'receive.denyCurrentBranch' configuration variable to 'refuse'.

error: failed to push some refs to 'server'
我已经研究了错误,它似乎表明我要推到的存储库不是空的,事实并非如此。这可能是git的问题吗?我正在使用SmartGit客户端


我还尝试过从远程回购中提取数据,但没有任何效果。

好吧,这很奇怪,我之前确实检查过git配置文件,它的参数设置为true。我完全肯定

此外,包括我在内的人以前也能够推动对该回购协议的承诺。您发出的命令返回false,因此我重新检查了git配置文件,并将bare设置为false。我把它设为真,然后按下按钮,问题就解决了

git config --bool core.bare
#returned false

配置文件一定在我不知道的情况下被编辑过。

您确定远程回购是裸回购吗?如果您可以访问该远程repo的服务器,
git config--bool core.bare
在其中执行时会返回什么?@VonC感谢您的帮助:-)