简体   繁体   中英

how can i delete a git repo without removing the files in it

i dont want to remove the files but just the old repository. everytime i go to commit it, it wont let me because its part of another repository

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")```

Check if you have, by mistake, initialized a Git repository in C:\Users\travi\Desktop\

dir C:\Users\travi\Desktop\.git

It yes, you could delete that one, leaving only C:\Users\travi\Desktop\github 1.16\.git , meaning: a Git repository in your current project, instead of a parent folder of that project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM