blob: 90a558d965d46f95d6c79917746640c952540c4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# git
## Create a repository
On the server:
```
git init --bare $REPOSITORY_PATH
```
## Push an existing repository
```
git remote add $REMOTE $SERVER_HOSTNAME:$REPOSITORY_PATH
git push $REMOTE main
```
## Exposing via gitweb
```
sudo ln -s $REPOSITORY_PATH /var/lib/git/$NAME.git
```
## Exposing via https
```
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.
|