解决 git 问题:fatal: not a git repository (or any of the parent directories): .git

@[TOC](解决 git 问题:fatal: not a git repository (or any of the parent directories): .git)

1、出现

今天使用 git 增加新的远程主机的时候,发现报下面这个错:fatal: not a git repository (or any of the parent directories): .git,如图:

在这里插入图片描述
提示说没有 .git 这样一个目录

2、解决办法

在命令行输入 git init 然后回车就好了

在这里插入图片描述

posted @ 2022-07-11 15:25  Dancing-Pierre  阅读(548)  评论(0)    收藏  举报  来源