我正在关注instructions given here以创建Git存储库。一切都很顺利,直到最后一行:Git推送错误:“origin似乎不是git存储库”
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
我使用Git版本1.7.11.3在OS X 10.6.8
$ git remote -v
返回任何内容的
配置文件repository:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
我h广告使用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)
很常见犯错。看看这个线程的帮助:http://stackoverflow.com/questions/10068172/git-push-origin-master-does-not-work – tymeJV 2013-03-15 16:44:00
命令“git remote -v”的输出是什么? – brimble2010 2013-03-15 16:46:35
您的说明链接已删除,您是否记得它是什么? – 2014-06-27 13:26:58