简体   繁体   English

当我在git命令提示符下键入“ git add”时,收到致命消息,即不是git存储库。

[英]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.

相关问题 致命:不是git存储库...错误消息 - fatal: Not a git repository … error message 嘿,我正在尝试在 heroku 上部署一个 Rails 应用程序,当我运行 git push heroku master 时收到以下错误消息 - hey I am trying to deploy a rails app on heroku, and i get the follow error message when i run git push heroku master 我正在通过 Git 将 Rails 应用程序部署到 Azure,但在推送时没有出现此类文件错误 - I am deploying a Rails app to Azure through Git and I get a no such file error when pushing 当我运行命令时,`git config -e`应该做什么? 我不断收到我要查找的页面不存在的通知 - What should `git config -e` do or look like when I run the command? I keep getting notice that the page I'm looking for doesn't exist 如何修复:错误:'<filename> ' 没有检查出致命的提交:输入“git add”时添加文件失败。 在命令提示符下</filename> - How to fix: error: '<filename>' does not have a commit checked out fatal: adding files failed when inputting "git add ." in command prompt 如何将 git 添加到 ruby 命令行? - How can I add git to the ruby command line? 致命:不是git存储库(或任何父目录):.git on every rails命令但是git命令工作正常 - fatal: Not a git repository (or any of the parent directories): .git on every rails command but git commands works fine 没有给出$ git push heroku master的结果,我正在使用boostrap,rails和heroku上的ruby - does not give results with $ git push heroku master, I am applying boostrap, ruby on rails and heroku 我应该将Rails 4 bin /目录添加到git吗? - Should I add the Rails 4 bin/ directory to git? 如何从Heroku中检索git存储库? - How do I retrieve a git repository from Heroku?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM