From ed6f0f2215b86f764655eb8e1e843224f98b87a8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 8 Apr 2023 01:40:42 -0400 Subject: [PATCH] Alias adding git trailers --- git/.gitconfig | 2 ++ zsh/.config/zsh/aliases | 1 + 2 files changed, 3 insertions(+) diff --git a/git/.gitconfig b/git/.gitconfig index 2e355a9..c3f1ed8 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -5,6 +5,8 @@ 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 + [commit] gpgsign = true diff --git a/zsh/.config/zsh/aliases b/zsh/.config/zsh/aliases index be95cd5..3ac045c 100644 --- a/zsh/.config/zsh/aliases +++ b/zsh/.config/zsh/aliases @@ -54,6 +54,7 @@ alias grc="git rm --cached" alias grh="git reset --hard" alias grm="git rm" alias gst="git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline" +alias gsw='git log --pretty="%an <%ae>" | sort -u | fzf | xargs -I "{}" git add-trailer "Co-authored-by: {}"' alias gup="git-branch-delete-merged" alias Grep='grep' alias l="ls"