Skip to content

Instantly share code, notes, and snippets.

@co-l
Created May 14, 2019 07:33
Show Gist options
  • Save co-l/4e498a03f16c6296f54f81f4d2bd352a to your computer and use it in GitHub Desktop.
Save co-l/4e498a03f16c6296f54f81f4d2bd352a to your computer and use it in GitHub Desktop.
Miracle Morning in Kubuntu with autocommit on GIT
#!/bin/bash
# miracle-morning.sh: creates a journal per month for the writing part of the miracle morning, and automatically pushed it to git
MONTH=$(date +"%Y-%m")
DAY=$(date +"%Y-%m-%d")
# ~/miracle-morning should be a git repository
kate ~/miracle-morning/journal/$MONTH.md
cd ~/miracle-morning
# create commit and push to origin
git add -A
git commit -am "commit journal $DAY"
git push
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment