From 99f687d0b5f8522b7bf0d73329e9b3b354941000 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 7 Feb 2026 20:06:01 +0800 Subject: added docs for commiting easily --- docs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs b/docs index 89d3373..96a0785 100644 --- a/docs +++ b/docs @@ -39,6 +39,16 @@ SSH keys: Create repo: git init --bare /git/myrepo +Init and push local repo: + REPO=myrepo TARGET=git HOST=root@git2.noml.ch \ + && git config --global init.defaultBranch main \ + && git config --global user.name "hc" \ + && git config --global user.email "hc@a.nub.ninja" \ + && git init \ + && ssh "$HOST" "set -e; git config --global init.defaultBranch main; git init --bare /$TARGET/$REPO" \ + && (git remote remove origin_$TARGET 2>/dev/null; git remote add origin_$TARGET "$HOST:/$TARGET/$REPO") \ + && git push origin_$TARGET --all + Restart: podman restart cgit -- cgit