我想要做的是,获取 Dropbox 项目的本地克隆,进行更改然后推送到该项目。
我的 PC 规格是:Os Win 8 X64,Git-1.7.11
我做了以下步骤:
- 将原始项目文件复制到 Dropbox 文件夹中
- 在位于本地文件系统,Dropbox 文件夹的项目目录中初始化 git repo
- 然后通过键入克隆此目录
git clone absolute/path/to/the/folder
- 对文件进行了一些更改,只是为了测试,提交..一切顺利
- 当我尝试通过键入
git push origin master
获取此错误消息来推送此消息时
原始 TXT 看起来像这样
$ git push origin master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 322 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare reposit
remote: error: is denied, because it will make the index and work tree incon
ent
remote: error: with what you pushed, and will require 'git reset --hard' to
h
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variabl
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing
remote: error: its current branch; however, this is not recommended unless y
remote: error: arranged to update its work tree to match what you pushed in
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour,
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse
To F:\Cloud\Dropbox\Web Server\pcand.me
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'F:\Cloud\Dropbox\Web Server\pcand.me'
尝试使用清理痕迹完全卸载并重新安装 3 次,执行上述步骤 2-3 次。没有任何帮助