Skip to content

Instantly share code, notes, and snippets.


Andrew Feeney AndrewFeeney

View GitHub Profile
AndrewFeeney / aim
Created March 26, 2019 00:25
A set of bash scripts to set a pre-written commit message and make the commit with the pre-written message
View aim
#!/usr/bin/env bash
vim ./COMMIT_MSG.aim.txt
AndrewFeeney /
Last active April 13, 2018 10:32
A bash script to pre-populate a tag annotation in vim with the first line of all commits since last tag:
# Tag the current commit with an annotation generated from the first line of the commit messages of all
# commits since the last tag. Default tag annotation is loaded into vim buffer and can be edited.
# Once you are happy with the message write the buffer and quit vim (type ":wq") and the tag will be generated
# Usage:
# tag 1.2.3
COMMITS_SINCE_LAST_TAG=$(git log `git describe --tags --abbrev=0`..HEAD --oneline)
echo "# Version $1"$'\n\n'Changelog:$'\n\n'"$COMMITS_SINCE_LAST_TAG" | vim - +'file TAG_ANNOTATION'