aboutsummaryrefslogtreecommitdiff
path: root/infrastructure/roles/git
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2025-10-11 21:27:30 +0200
committeralex <alex@pdp7.net>2025-10-11 21:27:30 +0200
commit4bbf78f4ea4a7ff8afa99779cd1676cb73c97b68 (patch)
treedab8052a3c7d17c2d26455744dced5a2b76cd2c2 /infrastructure/roles/git
parentdfd9b591d96b09b37474ab64ad04cb26316e73bf (diff)
Flesh out documentation
Diffstat (limited to 'infrastructure/roles/git')
-rw-r--r--infrastructure/roles/git/README.md14
1 files changed, 6 insertions, 8 deletions
diff --git a/infrastructure/roles/git/README.md b/infrastructure/roles/git/README.md
index f21bfef..90a558d 100644
--- a/infrastructure/roles/git/README.md
+++ b/infrastructure/roles/git/README.md
@@ -5,29 +5,27 @@
On the server:
```
-git init --bare $REPO
+git init --bare $REPOSITORY_PATH
```
## Push an existing repository
```
-git remote add $REMOTE_NAME $SERVER:$REPO
-git push $REMOTE_NAME main
+git remote add $REMOTE $SERVER_HOSTNAME:$REPOSITORY_PATH
+git push $REMOTE main
```
## Exposing via gitweb
```
-sudo ln -s $ABSOLUTE_PATH_TO_REPO /var/lib/git/$NAME.git
+sudo ln -s $REPOSITORY_PATH /var/lib/git/$NAME.git
```
-You can use `~/foo` as the `ABSOLUTE_PATH_TO_REPO` to expose a repository in your home directory.
-
## Exposing via https
```
-mv $ABSOLUTE_PATH_TO_REPO/hooks/post-update.sample $ABSOLUTE_PATH_TO_REPO/hooks/post-update
-ln -s $ABSOLUTE_PATH_TO_REPO ~/public_html/$REPO.git
+mv $REPOSITORY_PATH/hooks/post-update.sample $REPOSITORY_PATH/hooks/post-update
+ln -s $REPOSITORY_PATH ~/public_html/$REPO.git
```
Ensure that you push once to the repo, or run `git update-server-info` in the repository.