zsh: Add git alias for commiting with last message

This commit is contained in:
2020-09-27 18:36:35 +02:00
parent 10c8d7097a
commit 9ae3de7d64

View File

@@ -66,6 +66,14 @@ alias gpll='git pull'
alias gpull='git pull'
alias gdiff='git diff'
alias gd='git diff'
# git-commit, but put the last written commit message into the editor buffer
# for editing.
# Useful for example when the commit-msg hook fails but only slight
# modifications are needed.
alias git-commit-last-msg='() {
local gitdir="$(git rev-parse --git-dir)" || return
git commit -eF <(grep -v "^#" "$gitdir/COMMIT_EDITMSG")
}'
## Navigation
alias ls='ls --color=auto --group-directories-first -p -v'