We have two Git repos on a remote git server in this format:
/git/repo1
/git/repo2
In /git/repo1, I see these files & directories:
branches config description HEAD hooks info objects refs
In /git/repo2, I see this directory:
.git
and within .git, I see
branches config description HEAD hooks info logs objects refs
Both repos appear to work fine. However …
I am trying to figure out how this happened and if there is a problem with setup just waiting to jump out. Which one is “right” or does it not matter? If one is preferred (I think it might be repo1’s format), how do I make /git/repo2 to look like /git/repo1 (or vice versa)?
Repo1 is a bare repository and the other is not. Bare repositories are usually used only to be remotely connected to. Non-bare repositories are the kind developers do their work in.
This post details how to convert to a bare repository.