What is a git bare repository and when to use it

A lot of times, I see ques­tions about the dif­fer­ence between an ordi­nary git repos­i­tory and a bare git repos­i­tory. So I decided to quickly made up pic­ture of the actual dif­fer­ence, you know the kind of pic­ture that sticks in your mind if you are the kind of per­son who for­gets writ­ten text.

git_bare_repository

When to use it?

A git bare repos­i­tory is use­ful when you want to col­lab­o­rate with oth­ers but don’t want to use a host­ing ser­vice like github. In such cases, you can setup a remote server that is only acces­si­ble by your inter­nal team, cre­ate a bare repos­i­tory over there, which acts as the cen­tral git server from which each of you can push and pull your code from your local boxes.

Ryan Sukale

Ryan is a UX engineer living in San Francisco, California.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *