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
.gitfolder inside the repository containing all relevant data and all other files build your working copyin a bar Git repository, there is no working copy and the folder (let's call it
repo.git) contains the actual repository data
So, is it sufficient to do something like this?
cd repo
mv .git .. && rm -fr *
mv ../.git .
mv .git/* .
rmdir .git
cd ..; mv repo repo.git # renaming just for clarity
Or do I need to adapt any of Git's files that are/were in the .git folder?