aboutsummaryrefslogtreecommitdiffstats
path: root/.gitconfig
diff options
context:
space:
mode:
Diffstat (limited to '.gitconfig')
-rw-r--r--.gitconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/.gitconfig b/.gitconfig
index 422e082..fdf1dcf 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -13,6 +13,8 @@
ca = !git add . && git add -u && git commit -a
# Switch to a branch, creating it if necessary
go = checkout -B
+ # Credit an author on the latest commit
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Undo a `git push`
undopush = push -f origin HEAD^:master