【发布时间】:2013-03-04 11:32:55
【问题描述】:
我正在关注instructions given here 创建一个 Git 存储库。一切顺利,直到最后一行:
$ git push -u origin master
致命:'origin' 似乎不是 git 存储库
致命:远端意外挂断
我在 OS X 10.6.8 上使用 git 版本 1.7.11.3
$ git remote -v
什么都不返回
存储库的配置文件:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
我不得不使用 sudo visudo 命令打开 sudoers 文件并向其中添加以下内容(在 # 用户权限规范下):
git ALL=(ALL) ALL.
现在如果我这样做:
$ git remote add origin /Volumes/500GB/git-repository/myproject.git
返回时没有错误,但我在存储库中看不到任何代码 (它有前面提到的目录,比如分支,钩子,......)
如果我这样做:
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
$ git remote -v
origin /Volumes/500GB/git-repository/myproject.git (fetch)
origin /Volumes/500GB/git-repository/myproject.git (push)
【问题讨论】:
-
很常见的错误。查看此线程寻求帮助:stackoverflow.com/questions/10068172/…
-
命令“git remote -v”的输出是什么?
-
你的说明链接不见了,你还记得是什么吗?
标签: git git-remote