How can I convert a \'normal\' Git repository to a bare one?
The main difference seems to be:
in the normal Git repository, you have a .git
Here's what I think is safest and simplest. There is nothing here not stated above. I just want to see an answer that shows a safe step-by-step procedure. You start one folder up from the repository (repo) you want to make bare. I've adopted the convention implied above that bare repository folders have a .git extension.
(1) Backup, just in case.
(a) > mkdir backup
(b) > cd backup
(c) > git clone ../repo
(2) Make it bare, then move it
(a) > cd ../repo
(b) > git config --bool core.bare true
(c) > mv .git ../repo.git
(3) Confirm the bare repository works (optional, since we have a backup)
(a) > cd ..
(b) > mkdir test
(c) > cd test
(d) > git clone ../repo.git
(4) Clean up
(a) > rm -Rf repo
(b) (optional) > rm -Rf backup/repo
(c) (optional) > rm -Rf test/repo