On Mar 5, 7:12 pm, Julien Rabin <julien.ra...@gmail.com> wrote:

> Concerning the repository location, I tried to follow the instructions given 
> in the Pro Git book (but maybe did it wrong ?...). Is this a problem to have 
> them here ? Anyway, I will try to make other repo' elsewhere to practice my 
> hand and see how it works.

That book is good, but it's about Git and not about Unix. If you want
to read up on Unix, pick up some other book.
A Unix Filesystem Hierarchy Standard [1] is a good way to learn about
which directory means what on Unix. Not all systems follow it, but the
most widely used do follow it to a great extent.

In short: /opt is a directory for third-party software for which your
system does not have a ready-made package (or a package made by you).
Hence, it is not supposed to contain any user's stuff, especially
"volatile" stuff, which changes frequently. For these things Unix
offers a standard place: the /var/local hierarchy. The problem with it
is that it's supposed to be system-wide, and unless you really mean
your repo is system-wide (for instance, it is shared in the sense that
several other devs are supposed to commit to it) it's way better to
just put it under your home directory.
Note that Git itself does not mandate any place for your repo.
Moreover, you tell it to Git when you perform any remote operations!
So, for a private repo it's OK to be located, say, under ~/devel/
myrepo.git, and then you could refer to it locally as 
-- that way you won't get any permission problems by definition.

Things change if you need to "write-share" the repo between several
devs. In this case you have generally two ways to implement this:
1) Create a common directory for shared repos, a group including all
the devs and set the correct permissions for this group on that
2) Use some "hosting" tool like gitosis or gitolite which would care
permissions problems all by themselves and more.

> PS: oh and the perms of the /tmp folder are 'drwxr-xr-x' so I got to fix this 
> as well if I got it correctly. But one problem at a time.
As I've said, the correct permissions are 1777.

1. http://www.pathname.com/fhs/

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to