Skip to content

Instantly share code, notes, and snippets.

@jasonkneen
Created November 16, 2018 11:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonkneen/f84eca48693d05ef16399796ee33c1a3 to your computer and use it in GitHub Desktop.
Save jasonkneen/f84eca48693d05ef16399796ee33c1a3 to your computer and use it in GitHub Desktop.
Getting release notes from Git logs
# drop this into your ./.gitconfig file
# usage
# $ git today
# $ git yesterday
# $ git since 18-11-01
#
# will display a list of formatted commits you can lift to use for release notes
[alias]
today = log --since=1am --pretty=format:"%C(blue)-\\ %s"
yesterday = log --since=yesterday --pretty=format:"%C(blue)-\\ %s"
since = "!f() { git log --since="$1" --pretty=format:\"%C(blue)- %s\"; }; f"
@jasonkneen
Copy link
Author

First two were original aliases I created and the "since" one was added to enable by date -- you can also do:

$ git since yesterday
$ git since today

so you could remove the today and yesterday aliases completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment