首页 > 其他 > 详细

新目录下使用git管理,未配置.git目录,报错fatal: Not a git repository (or any of the parent directories): .git

时间:2017-05-27 00:14:31      阅读:621      评论:0      收藏:0      [点我收藏+]

 

fatal: Not a git repository (or any of the parent directories): .git


第一次用Git,遇到这个错误提示,原来是这样的:

fatal: Not a git repository (or any of the parent directories): .git

This tells you that the directory you‘re in is not a git repository. Before you can add remote servers, commit things and so you must have a git repository created.

In a git repository there‘s a directory (which can be hidden) named .git. It contains metadata on the repository and all the data regarding the checked files.

To create it type git init in the directory you wish to have a git repository. Then you could add remote servers and perform operations on it.

 执行git init之后,然后再重新编译,这个问题就被解决了。这里要注意的一点是,和svn不一样,svn不需要自己使用命令来创建自己的资源库,而git需要自己使用命令手动创建,具体.git的位置和你在哪个目录下执行命令有关。

 

新目录下使用git管理,未配置.git目录,报错fatal: Not a git repository (or any of the parent directories): .git

原文:http://www.cnblogs.com/xilego/p/6910821.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!