致命:不是git存储库(或任何父目录):.git [duplicate]

本文翻译自:fatal: Not a git repository (or any of the parent directories): .git [duplicate]

When I tried to push an existing repository on github.com, and it when I entered the command the website prompted me to put into the terminal, I got this error message fatal: 当我尝试将现有存储库推送到github.com上,并且当我输入命令时,网站提示我将其放入终端,我得到了以下致命错误消息:

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

If anyone could help me with this, then that would be great, thanks. 如果有人可以帮助我,那就太好了,谢谢。


#1楼

参考:https://stackoom.com/question/1nEtl/致命-不是git存储库-或任何父目录-git-duplicate


#2楼

The command has to be entered in the directory of the repository. 该命令必须在存储库的目录中输入。 The error is complaining that your current directory isn't a git repo 错误提示您当前目录不是git repo

  1. Are you in the right directory? 您在正确的目录中吗? Does typing ls show the right files? 输入ls是否显示正确的文件?
  2. Have you initialized the repository yet? 您是否已初始化存储库? Typed git init ? 键入git init吗? ( git-init documentation ) git-init文档

Either of those would cause your error. 这些都会导致您的错误。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值