6

If I want to turn a local git repository into a regular (non versioned) folder what do I have to do?

I've had an SVN project before and in that case I had to delete an SVN folder from every directory. I've read git has one project folder but after some searching it sounds like there is more to it.

PS I do not want to export a repository because not all the contents are checked in.

1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
  • 1
    The settings are a hidden folder called `.git` at the root of the repository. You can just delete this folder... or simply not use Git to commit anything. – Obsidian Age Jul 15 '19 at 23:51

1 Answers1

19

Just delete .git directory and it will be all.

Actually, as far as a file manager (windows file explorer or nautilus etc) is concerned, a git repo is just a directory. Nothing to do.

Edward Aung
  • 3,014
  • 1
  • 12
  • 15
  • If the directory was a nested git repository, might also need to also re-stage any current changes in the parent (now, only) git repo, like `git reset` then `git add .`, else it might still treat the directory that previously contained `.git` as a nested repo – user56reinstatemonica8 Apr 03 '23 at 13:08