I'm pulling a bunch of company git repositories from an older host to our company git server. I started by just git clone
-ing the old repos into the repositories directory on the new server. Soon we're going to point DNS for the old host to the new server.
My question is this: should I make the new repositories bare repos before this switch happens, or can they function as they are (normal, non-bare repositories with .git/
directories)? I'm guessing the former, but I'd like someone who actually knows to confirm this.
You don't have to make them bare repositories, but I would strongly consider doing so for the sake of cosmetic consistency (git "servers" have a bare repo, git "clients" have a checkout with a .git directory).
If nothing else, it's less to back up.
Like voretaq7 said. Yes, it is highly advisable.
In GitMagic ch3 there is a good explanation of why you want to use a bare repo.
To make the transition easy use:
There is question on StackOverflow that discusses the the difference between git clone --mirror and git clone --bare.