Skip to content

Instantly share code, notes, and snippets.

@apgapg
Last active April 1, 2021 03:53
Show Gist options
  • Save apgapg/7bf88061a6042d863111cae567bedb4f to your computer and use it in GitHub Desktop.
Save apgapg/7bf88061a6042d863111cae567bedb4f to your computer and use it in GitHub Desktop.
Get commits since last tag in pretty format
# Make sure you run this in valid git repository
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'@begin@%s@space@%B@end@' > new-in-this-release.log
# You can use following formats below to modify your --pretty output
# {
# hash: "%H",
# abbrevHash: "%h",
# treeHash: "%T",
# abbrevTreeHash: "%t",
# parentHashes: "%P",
# abbrevParentHashes: "%P",
# authorName: "%an",
# authorEmail: "%ae",
# authorDate: "%ai",
# authorDateRel: "%ar",
# committerName: "%cn",
# committerEmail: "%ce",
# committerDate: "%cd",
# committerDateRel: "%cr",
# subject: "%s",
# body: "%b",
# rawBody: "%B",
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment