From 1352be08c85c5407fba4bc950c8972c6ecb06b0d Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Thu, 26 Oct 2023 14:49:33 +0300 Subject: [PATCH] add notes about auto zim git push --- Home/AutoZimGitPush.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Home/AutoZimGitPush.txt diff --git a/Home/AutoZimGitPush.txt b/Home/AutoZimGitPush.txt new file mode 100644 index 0000000..91d3a37 --- /dev/null +++ b/Home/AutoZimGitPush.txt @@ -0,0 +1,29 @@ +Content-Type: text/x-zim-wiki +Wiki-Format: zim 0.6 +Creation-Date: 2023-10-26T14:44:31+03:00 + +====== AutoZimGitPush ====== +Created neljapäev 26 oktoober 2023 + +===== First Time config ===== + +''cd ~/Notebooks/Notes'' +''git remote add origin'' [[gitea@git.wut.ee|''gitea@git.wut.ee'']]'':arti/zim.git'' +''git push -u origin main'' + +===== Auto push ===== +You have to create git hook that runs after each git commit + +''cd ~/Notebooks/Notes'' +''nano .git/hooks/post-commit'' + +with contents +{{{code: lang="sh" linenumbers="True" +#!/bin/bash +git push + +}}} +and make it executable + +''chmod +x .git/hooks/post-commit'' +