相关疑难解决方法(0)

Git推错误'[远程拒绝]主 - >主(分支当前已检出)'

昨天,我发布了一个关于如何将Git存储库从我的一台机器克隆到另一台机器的问题,如何从另一台机器"克隆"?.

我现在能够成功地将Git存储库从我的源(192.168.1.2)克隆到我的目标(192.168.1.1).

但是,当我对文件,a git commit -a -m "test"和a 进行编辑时git push,我在目的地(192.168.1.1)上收到此错误:

git push                                                
hap@192.168.1.2's password: 
Counting objects: 21, done.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1010 bytes, done.
Total 11 (delta 9), reused 0 (delta 0)
error: refusing to update checked out branch: refs/heads/master
error: By default, updating the current branch in a non-bare repository
error: is denied, because it will make the index and work tree inconsistent
error: …
Run Code Online (Sandbox Code Playgroud)

git git-push

943
推荐指数
17
解决办法
44万
查看次数

标签 统计

git ×1

git-push ×1