3 ms·
I use git and surround my note taking scripts with these two functions. # Pull Notes to make sure you are completely up to date before editing. function pull_
by cliff_badger 8y ago
I use git and surround my note taking scripts with these two functions.
# Pull Notes to make sure you are completely up to date before editing.
function pull_notes() {
(
cd $NOTES_DIR
git stash
git pull
git stash pop
)
}
# Push Notes up the git repo that these are attached to.
function push_notes() {
date=$(date)
(
cd $NOTES_DIR
git add .
if [[ $(git status -s) ]]; then
git commit -m "Notes Updated: $date"
git push
fi
)
}