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'' +