git错误推送失败

时间:2013-03-15 01:59:23

标签: windows git

当我尝试将更改推送到本地仓库时,我收到此错误

remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
To C:\LocalRepositories\CompareDateTime
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'C:\LocalRepositories\CompareDateTime'

1 个答案:

答案 0 :(得分:2)

您正试图推送到遥控器的已检出分支,默认情况下,您不能。

有关更多帮助,请参阅this question