Document helper script usage
This commit is contained in:
parent
90b991f407
commit
c25f99e1c8
1 changed files with 13 additions and 1 deletions
14
README.md
14
README.md
|
@ -28,7 +28,19 @@ cd
|
||||||
git clone https://git.zeus.gent/midgard/git-mirror.git; cd git-mirror
|
git clone https://git.zeus.gent/midgard/git-mirror.git; cd git-mirror
|
||||||
./git-mirror.sh ~/git-mirror-my-repo github gitea gitlab
|
./git-mirror.sh ~/git-mirror-my-repo github gitea gitlab
|
||||||
```
|
```
|
||||||
The first remote, github is the leader. The others are followers that are updated.
|
The first remote, `github` in this case, is the leader. The others are followers that are updated.
|
||||||
|
|
||||||
|
If you want to do this conveniently every now and then, you can create a script like this in your
|
||||||
|
repository's directory:
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
mirror="$HOME/git-mirror/git-mirror.sh"
|
||||||
|
here="$(dirname "$0")"
|
||||||
|
exec "$mirror" --notor "$here" github origin
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to make it executable, and gitignore it when relevant. A good idea may be to choose an
|
||||||
|
arcane name, like `update--.sh`, and add it to a global gitignore file in `~/.gitignore`.
|
||||||
|
|
||||||
## Automate
|
## Automate
|
||||||
To automate mirroring, run it periodically, for example once every 30 minutes. On a *NIX you could
|
To automate mirroring, run it periodically, for example once every 30 minutes. On a *NIX you could
|
||||||
|
|
Loading…
Reference in a new issue