Skip to content

Instantly share code, notes, and snippets.

@arlm
Forked from logicaroma/git 2 changelog
Last active August 29, 2015 14:23
Show Gist options
  • Save arlm/2dab272c405bd3c89ea8 to your computer and use it in GitHub Desktop.
Save arlm/2dab272c405bd3c89ea8 to your computer and use it in GitHub Desktop.
# The Script
```sh
git log v2.1.0...v2.1.1 --pretty=format:'<li> <a href="http://github.com/jerel/<project>/commit/%H">view commit &bull;</a> %s</li> ' --reverse | grep "#changelog"
```
# A git alias for the command:
```sh
chlogm = !sh -c 'git log $1...$2 --pretty=format:\"%s [view commit](http://github.com/$3/$4/commit/%H) \"' -
```
## Usage of the alias:
```sh
git chlogm first_tag last_tag github_user github_repo
```
# Other logs
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
changelog = !sh -c 'git log $1...$2 --pretty=format:\"%s [view commit](http://github.com/$3/$4/commit/%H) \"' -
mylol = log --graph --decorate --pretty=oneline --abbrev-commit --all
git-log-tags + --no-merges --format=%B > CHANGELOG.TXT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment