Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Feeney AndrewFeeney

View GitHub Profile
@AndrewFeeney
AndrewFeeney / aim
Created Mar 26, 2019
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
AndrewFeeney / tag.sh
Last active Apr 13, 2018
A bash script to pre-populate a tag annotation in vim with the first line of all commits since last tag:
View tag.sh
#!/bin/bash
# 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'
You can’t perform that action at this time.