[英]I am getting fatal message i.e not a git repository, when I am typing “git add .” in git command prompt.
I wanted to add screen shot of that, but i didn't have that much reputation as I am new to this. 我想添加屏幕截图,但是由于我是新来的,所以我没有那么多声誉。 I am getting fatal message ie not a git repository, when I am typing "git add ." 当我输入“ git add”时,我收到致命消息,即不是git存储库。 in git command prompt. 在git命令提示符下。 I am currently new to ruby on rails.What should I do? 我目前刚接触红宝石,该怎么办?
It sounds to me that when you are executing git add .
在我看来,当您执行git add .
your current directory is not part of the working tree of a git repository. 您当前的目录不属于git存储库的工作树。
Make sure that there is a .git
folder (containing the Git repository) in you current directory or a parent directory of the current directory. 确保当前目录或当前目录的父目录中有一个.git
文件夹(包含Git存储库)。 If there is not, you need to properly initialize a git repository by git clone
(if you are starting from some other git repository) or git init
(if you are starting a new repository). 如果没有,则需要通过git clone
(如果从其他git仓库开始)或git init
(如果要启动新的仓库)来正确初始化git仓库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.