rjss
rjss

Reputation: 1013

Is Git bare repository worth creating for a single user?

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

Upvotes: 3

Views: 453

Answers (4)

Jackie Birds
Jackie Birds

Reputation: 61

  • Yes, if you use gitHub, you can use a bare repository online to show how your work is.
  • You can access your code when you need it in the future.
  • Others can develop an idea from your code and the require you help them to finish it, and they can pay you for it.

Upvotes: 2

poke
poke

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

CodeWizard
CodeWizard

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

Peter Schneider
Peter Schneider

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

Related Questions