【发布时间】:2013-10-20 13:37:23
【问题描述】:
我在 ~/Documents/Share 上有一个文件夹,其中包含我经常使用并且可以一起工作的类。我想在 git 子模块中转换该文件夹,然后将其导入 Xcode 5。我的想法是在很多项目中使用该 git。
在过去的 3 个小时里,我一直在努力解决这个问题。我在网上尝试了十几个“简单”的说明,但没有一个奏效。
我该怎么做?我想要的只是创建一个本地子模块来处理本地项目。
请不要给露骨的解释......像我五岁一样解释我(因为我以前从未使用过git)。
是的,我对终端很熟悉。
当我尝试按照建议执行 git push 时,我看到了这个错误:
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 292 bytes | 0 bytes/s, done.
Total 3 (delta 2), 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 to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
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 some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
【问题讨论】:
-
你做了什么,遇到了什么错误?
-
在收到此错误之前您具体做了什么?
-
也许这个链接有帮助:stackoverflow.com/questions/2816369/…
标签: iphone ios xcode git xcode5