Skip to content

Instantly share code, notes, and snippets.

@jamtur01
Created January 6, 2014 22:22
Show Gist options
  • Save jamtur01/8290858 to your computer and use it in GitHub Desktop.
Save jamtur01/8290858 to your computer and use it in GitHub Desktop.
prepare-commit-msg for Docker commits
#!/bin/sh
#
GH_USER=$(git config --get github.user)
SOB=$(git var GIT_AUTHOR_IDENT | sed -n "s/^\(.*>\).*$/Docker-DCO-1.0-Signed-off-by: \1 $GH_USER/p")
grep -qs "^$SOB" "$1" || echo "\n$SOB" >> "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment