You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/04-git-server/sections/git-on-a-server.asc
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,29 +37,29 @@ It takes the Git repository by itself, without a working directory, and creates
37
37
==== Putting the Bare Repository on a Server
38
38
39
39
Now that you have a bare copy of your repository, all you need to do is put it on a server and set up your protocols.
40
-
Let's say you've set up a server called `git.example.com` that you have SSH access to, and you want to store all your Git repositories under the `/opt/git` directory.
41
-
Assuming that `/opt/git` exists on that server, you can set up your new repository by copying your bare repository over:
40
+
Let's say you've set up a server called `git.example.com` that you have SSH access to, and you want to store all your Git repositories under the `/srv/git` directory.
41
+
Assuming that `/srv/git` exists on that server, you can set up your new repository by copying your bare repository over:
At this point, other users who have SSH access to the same server which has read-access to the `/opt/git` directory can clone your repository by running
48
+
At this point, other users who have SSH access to the same server which has read-access to the `/srv/git` directory can clone your repository by running
If a user SSHs into a server and has write access to the `/opt/git/my_project.git` directory, they will also automatically have push access.
55
+
If a user SSHs into a server and has write access to the `/srv/git/my_project.git` directory, they will also automatically have push access.
56
56
57
57
Git will automatically add group write permissions to a repository properly if you run the `git init` command with the `--shared` option.(((git commands, init, bare)))
0 commit comments