Reputation: 1013
Is there any advantage to have a bare repository, if I am the only user of the repository?
Upvotes: 3
Views: 453
Reputation: 61
Upvotes: 2
Reputation: 387637
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.
Upvotes: 5
Reputation: 142084
There is no advantage to use bare repo if you are the only one.
You can always convert your repo to bare one is you need to.
Bare repo doesn't have any files in its working directory, its simply the .git folder as the main folder
Upvotes: 1
Reputation: 2929
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.
Upvotes: 3