10

I have an Ubuntu box at home, and I want to have a directory that has all (more or less) my Git repositories. Eventually (when I get some team projects at school this year), I'll want have some of the projects shared.

I was thinking of creating a directory in /usr/share/. Is that the best place to put them (is there anything "wrong" with this location) , or should I create my repositories elsewhere?

  • If you want to share them with class mates consider using github or bitbucket, both will make life much easier and will ensure that your code is backed up in case something happens to your computer – Zachary K Jul 15 '12 at 3:37
  • @ZacharyK, I'm not sure how close using github would fall under "posting homework solutions online." Though at least with bitbucket I think they do offer some private team-based repositories for smaller teams... – Wayne Werner Jul 18 '12 at 4:42
  • Bit bucket does let you have free private repos, but you can only share them with up to 5 people before you have to pay for them. – Zachary K Jul 18 '12 at 8:32
  • Which is probably enough for most school teams – Wayne Werner Jul 18 '12 at 15:13
  • the problem is that its 5 people total not 5 per repo, so if you want to share repo A with 3 people and repo B with 3 different people you have to pay. – Zachary K Jul 18 '12 at 17:34
5

Put them anywhere you like... /usr/share is fine...

  • 4
    Just will have to ensure that the rights are correct – Sathyajith Bhat Aug 16 '10 at 16:30
  • Can someone expand what "correct rights" are? I presume it's g+rw and adding users to a group (i.e. dev) – Jonathan Aug 15 '17 at 22:33
6

Another option would be /srv

One method for structuring data under /srv is by protocol, eg. ftp, rsync, www,
and cvs. On large systems it can be useful to structure /srv by administrative
context, such as /srv/physics/www, /srv/compsci/cvs, etc. This setup will differ
from host to host. /srv should always exist on FHS compliant systems and should
be used as the default location for such data.

/srv : Data for services provided by this system

Related

Where to store git repositories in linux?

1

Why not create a user just for sharing your git repos and store the repos in the user's home directory? You could easily setup git ssh sharing.

0

As the git repository is contained inside your work directory, just place the work directories wherever is most convenient. It is a good idea to setup repositories elsewhere (for backup purposes, basically), there you'd have to come up with some standard location.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.