如何删除git repo而不删除其中的文件
我不想删除文件,只想删除旧的存储库。每次我去提交它时,它都不会让我提交,因为它是另一个存储库的一部分如何删除git repo而不删除其中的文件,git,github,Git,Github,我不想删除文件,只想删除旧的存储库。每次我去提交它时,它都不会让我提交,因为它是另一个存储库的一部分 C:\Users\travi\Desktop\github 1.16>git commit -a On branch main Your branch is up to date with 'origin/main'. Changes not staged for commit: (use "git add <file>..." to update w
C:\Users\travi\Desktop\github 1.16>git commit -a
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: mods (modified content, untracked content)
no changes added to commit (use "git add" and/or "git commit -a")```
C:\Users\travi\Desktop\github 1.16>git提交-a
主支管上
您的分支机构使用“origin/main”更新。
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git restore…”放弃工作目录中的更改)
(提交或放弃子模块中未跟踪或修改的内容)
修改:mods(修改内容、未跟踪内容)
未向提交添加任何更改(使用“git add”和/或“git commit-a”)```
检查您是否在C:\Users\travi\Desktop\
dir C:\Users\travi\Desktop\.git
是的,你可以删除它,只留下
C:\Users\travi\Desktop\github 1.16\.git
,意思是:你当前项目中的git存储库,而不是该项目的父文件夹。你在git repo中有一个git repo。如果您希望其中一个不再是回购协议,请找到该回购协议(它是一个名为.git的不可见文件夹),并将其扔进垃圾桶。