zl程序教程

您现在的位置是:首页 >  工具

当前栏目

【已解决】is found locally with remote(s): fatal: Not a git repository

Git 解决 not is with found Remote fatal
2023-09-27 14:27:46 时间

git submodule add *******************************************************
A git directory for 'adsplugin' is found locally with remote(s):
fatal: Not a git repository: '.git/modules/adsplugin'
If you want to reuse this local git directory instead of cloning again from
  git@git.haizhebar.com:jikai/adsplugin.git
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.

在一次偶然的换皮工作中...由于git经验并不是很丰富的我 就乱七八糟和这个八哥不期而遇了

幸好我机制的一笔找同事某帅帮我解决了

下面分享一下解决流程

第一步 不要慌 点个煤气罐冷静一下(备份好数据 怎么搞都行 打个压缩包)

第二步 百度搜答案 google搜(未果 写的都不是很对 或者不是很详细)

第三步 找个会的同事  翻译后是

git submodule add git@git.haizhebar.com:jikai / adsplugin.git
'adsplugin'的git目录是在本地找到的远程(s):
致命的:不是一个混帐存储库:'.git / modules / adsplugin'
如果你想重用这个本地git目录,而不是再次克隆
  git@git.haizhebar.com:吉凯/ adsplugin.git
使用'--force'选项。 如果本地git目录不是正确的回购
或者你不确定这意味着用'--name'选项选择另一个名字。

第四步  删除.git\modules 的 
adsplugin

文件夹  

整个删除 一点都不要慌  

然后再拉下来就可以了