Skip to content

Instantly share code, notes, and snippets.

@jwir3
Last active June 23, 2023 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwir3/ed2eac850f62915473817ee7396ba13b to your computer and use it in GitHub Desktop.
Save jwir3/ed2eac850f62915473817ee7396ba13b to your computer and use it in GitHub Desktop.
PATH_TO_YUBIKEY_PRESENT_SCRIPT=/some/path/to/yubikey-present.sh
function git() {
if [[ "$1" == "commit" && $(${PATH_TO_YUBIKEY_PRESENT_SCRIPT}) == "true" ]]; then
shift 1
command git commit -S "$@"
else
command git "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment