Skip to content

Instantly share code, notes, and snippets.

@sagi
Created April 18, 2025 04:57
Show Gist options
  • Save sagi/91c69c2410c9244e8d2d9e60c8dfb2b1 to your computer and use it in GitHub Desktop.
Save sagi/91c69c2410c9244e8d2d9e60c8dfb2b1 to your computer and use it in GitHub Desktop.
Commit Obsidian vault changes when terminal opens (zsh started)
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