I am a newbee with git. I have installed git on my pc and set several folders as git local repositories. But some of them I would like to detach/unset now and want to keep the files inside. How to do that?
Asked
Active
Viewed 62 times
0
-
See https://stackoverflow.com/questions/3212459/is-there-a-command-to-undo-git-init – Muhammed B. Aydemir Feb 12 '21 at 09:52
-
5Does this answer your question? [Is there a command to undo git init?](https://stackoverflow.com/questions/3212459/is-there-a-command-to-undo-git-init) – Giannis Feb 12 '21 at 10:26
-
but it is about deleting the whole directory/folder. I want to keep it, I just want to undo it as a git-folder. But tried to apply it and get the error message: fatal: not a git repository (or any of the parent directories): .git – kirilb Feb 12 '21 at 11:16
-
Use [`git rev-parse --absolute-git-dir`](https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---absolute-git-dir) to find the directory where `.git` resides. – phd Feb 12 '21 at 11:59
-
Maybe my question was not understandable, bot none of the answers worked for me. What worked is that: https://stackoverflow.com/questions/32065278/remove-git-file – kirilb Feb 15 '21 at 07:01