diff options
author | Mathias Bynens <mathias@qiwi.be> | 2012-05-23 11:38:56 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-05-23 11:38:56 +0200 |
commit | dbf0b7ebf4fbc072fae19c6731c3f618f8ed8770 (patch) | |
tree | 6993a35fccf57e499c9029f51c0d209ce2ccff1c | |
parent | 475039d0d665be2b386f3697f7456f72537f50d3 (diff) | |
download | dotfiles-dbf0b7ebf4fbc072fae19c6731c3f618f8ed8770.tar.gz dotfiles-dbf0b7ebf4fbc072fae19c6731c3f618f8ed8770.tar.bz2 dotfiles-dbf0b7ebf4fbc072fae19c6731c3f618f8ed8770.zip |
.gitconfig: Add `credit` alias to quickly change the author of the latest commit
Inspired by @holman’s https://github.com/holman/dotfiles/blob/master/bin/git-credit.
-rw-r--r-- | .gitconfig | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |