Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Git bare repository worth creating for a single user?

Tags:

git

git-bare

Is there any advantage to have a bare repository, if I am the only user of the repository?

like image 952
rjss Avatar asked Dec 04 '25 16:12

rjss


2 Answers

Even as a single developer working on a project, having a bare repository has some kind of benefit. It allows you to have a copy of your repository that is not the same as your local repository with your working directory. While it’s hard to really mess up your local repository, this would give you some additional sense of security.

You could also use this to coordinate work with multiple computers. For example, you could have a bare repository on a USB stick and work with it from home and your work computer which each have their own independent local repository. So you would be like two developers with separate repositories, except that you share the same mind.

You can also use it to train working with a remote repository, or even use it as an additional “staging” area for your real remote repository.

But in the end, you don’t necessarily need it, but it also doesn’t hurt to have it.

like image 57
poke Avatar answered Dec 06 '25 06:12

poke


A bare repository makes sense on the server side, because you have no working copy. It doesn't matter if you are the only one using it.

like image 24
Peter Schneider Avatar answered Dec 06 '25 07:12

Peter Schneider