Git 推送存储库时发生远程错误
我有两个存储库项目和项目2。Project2是ProjectRepository的克隆,每当我尝试从Project2推送文件时,都会出现远程错误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
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
正在工作