Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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_Push - Fatal编程技术网

Git 推送存储库时发生远程错误

Git 推送存储库时发生远程错误,git,push,Git,Push,我有两个存储库项目和项目2。Project2是ProjectRepository的克隆,每当我尝试从Project2推送文件时,都会出现远程错误 Total 6 (delta 0), reused 0 (delta 0) remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bar

我有两个存储库项目和项目2。Project2是ProjectRepository的克隆,每当我尝试从Project2推送文件时,都会出现远程错误

Total 6 (delta 0), reused 0 (delta 0)
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 t
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing int
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 som
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, se
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To C:/Users/Ashish/Desktop/new_1
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'C:/Users/Ashish/Desktop/new_1'

你拉过git吗?如果没有,您是否可以执行此操作并显示输出:
git fetch--all
然后
git branch-va
?是
git pull
正在工作
git pull
?如果没有,您可以这样做并显示输出:
git fetch--all
然后
git branch-va
?是
git pull
正在工作