From cc7cdf95caae05ea8e8c66eece009b810bf704bc Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 2 Feb 2024 11:14:17 -0500 Subject: [PATCH] Allow some aliases to work on empty commits --- git/.gitconfig | 2 +- zsh/.config/zsh/aliases | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git/.gitconfig b/git/.gitconfig index c3f1ed8..dfd17da 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -5,7 +5,7 @@ hist-tags = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative most-recent-by-branch = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' root = rev-parse --show-toplevel - add-trailer = commit --no-edit --amend --trailer + add-trailer = commit --allow-empty --no-edit --amend --trailer [commit] diff --git a/zsh/.config/zsh/aliases b/zsh/.config/zsh/aliases index b972dad..09e2d77 100644 --- a/zsh/.config/zsh/aliases +++ b/zsh/.config/zsh/aliases @@ -21,7 +21,7 @@ alias gaa="git add --all" alias gap="git add --patch" alias gb="git branch" alias gc="git commit" -alias gca="git commit --amend" +alias gca="git commit --amend --allow-empty" alias gcl="git commit -m 'Linting'" alias gcn="git commit --allow-empty --message 'noop'" alias gco="advanced-git-checkout"