diff options
| author | Your Name <you@example.com> | 2026-02-07 20:06:01 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-02-07 20:06:01 +0800 |
| commit | 99f687d0b5f8522b7bf0d73329e9b3b354941000 (patch) | |
| tree | 148051f4d1a2248aa5a2f9212316cd652b5ed810 /docs | |
| parent | d1cebc658174a16014c2a3847bdf55bb3553b7fb (diff) | |
added docs for commiting easily
Diffstat (limited to 'docs')
| -rw-r--r-- | docs | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -39,6 +39,16 @@ SSH keys: | |||
| 39 | Create repo: | 39 | Create repo: |
| 40 | git init --bare /git/myrepo | 40 | git init --bare /git/myrepo |
| 41 | 41 | ||
| 42 | Init and push local repo: | ||
| 43 | REPO=myrepo TARGET=git HOST=root@git2.noml.ch \ | ||
| 44 | && git config --global init.defaultBranch main \ | ||
| 45 | && git config --global user.name "hc" \ | ||
| 46 | && git config --global user.email "hc@a.nub.ninja" \ | ||
| 47 | && git init \ | ||
| 48 | && ssh "$HOST" "set -e; git config --global init.defaultBranch main; git init --bare /$TARGET/$REPO" \ | ||
| 49 | && (git remote remove origin_$TARGET 2>/dev/null; git remote add origin_$TARGET "$HOST:/$TARGET/$REPO") \ | ||
| 50 | && git push origin_$TARGET --all | ||
| 51 | |||
| 42 | Restart: | 52 | Restart: |
| 43 | podman restart cgit | 53 | podman restart cgit |
| 44 | 54 | ||
