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
folder inside the repository containing all relevant data and all other files build your working copyin a bare Git repository, there is no working copy and the folder (let's call it
repo.git
) contains the actual repository data
I just wanted to push to a repository on a network path but git would not let me do that unless that repository was marked as bare. All I needed was to change its config:
No need to fiddle with the files unless you want to keep it clean.
I think the following link would be helpful
GitFaq: How do I make existing non-bare repository bare?
i've read the answers and i have done this:
this will leave the contents of
repos/.git
as the barerepos.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.