简体   繁体   中英

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 ." in git command prompt. I am currently new to ruby on rails.What should I do?

It sounds to me that when you are executing git add . your current directory is not part of the working tree of a git repository.

Make sure that there is a .git folder (containing the Git repository) in you current directory or a parent directory of the current directory. 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM