Created
April 18, 2025 04:57
-
-
Save sagi/91c69c2410c9244e8d2d9e60c8dfb2b1 to your computer and use it in GitHub Desktop.
Commit Obsidian vault changes when terminal opens (zsh started)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/sagi/gits/obsidian | |
if [[ `git status --porcelain` ]]; then | |
echo '\033[1;33mOBSIDIAN CHANGES DETECTED; SAVING\033[00m' | |
git add * | |
git commit -am 'autosave' | |
git push origin master | |
fi | |
cd ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment