Last active
October 11, 2018 20:54
-
-
Save murat/1b04574e4110d5a87f2346c9eda59981 to your computer and use it in GitHub Desktop.
A shell script for generate CHANGELOG from git log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "" ]; then | |
INITIAL=`git rev-list HEAD | tail -n 1` | |
else | |
INITIAL="$1" | |
fi | |
git log "$INITIAL"...HEAD --pretty=format:"- [%h](`git remote -v | grep fetch | head -1 | cut -f 2 | cut -d ' ' -f 1 | sed -e 's/git@/https:\/\//' -e's/\.git$//' | sed -E 's/(\/\/[^:]*):/\1\//'`/commit/%H) %s" |
Installation
Copy and paste this script to /usr/bin/changelog
or another location, and then make it executable by sudo chmod u+x /path/of/the/changelog
🥇
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
😅