Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@makzan
Created March 3, 2012 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makzan/1963105 to your computer and use it in GitHub Desktop.
Save makzan/1963105 to your computer and use it in GitHub Desktop.
Logging to Day One from git commit
# modification code for the "git to log commits to Day One"
# at http://brettterpstra.com/logging-with-day-one-geek-style/
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"
}
# And use the branch name in the log message
GIT_DIR=$(parse_git_branch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment