diff --git a/bash/bashrc/sources/31_git-utils b/bash/bashrc/sources/31_git-utils index 0a7719d..a06cae0 100644 --- a/bash/bashrc/sources/31_git-utils +++ b/bash/bashrc/sources/31_git-utils @@ -14,6 +14,13 @@ function git-config-as { echo "Configured as \"$NAME <$EMAIL>\"" } +function git-amend-author { + NAME=$( git config user.name ) + EMAIL=$( git config user.email ) + + git commit --amend --no-edit --author "$NAME <$EMAIL>" +} + if [ ! -f "$HOME/.gitconfig" ]; then cat << ___CONF___ > "$HOME/.gitconfig"