aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2022-12-14 20:34:30 +0900
committernsfisis <nsfisis@gmail.com>2022-12-15 22:07:17 +0900
commit6ff48cb27ed3c2e653021f5c4c6a32cce52b4081 (patch)
treed51456216eb1c128605b220711a74c524d7a8db6
parentc8132ddbb6baa7b2f1f3e9c2d297a25f1c1107d4 (diff)
downloaddotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.tar.gz
dotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.tar.zst
dotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.zip
git: add alias config-user
-rw-r--r--.config/git/config9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/git/config b/.config/git/config
index d1dce9a..37f50a0 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -135,3 +135,12 @@
cpickc = "!GIT_EDITOR=true git cherry-pick --continue"
empty = commit --allow-empty
last-merge-commit = "!git rev-list --abbrev-commit --merges HEAD | head -n 1"
+ config-user = "!__fn() { \
+ if [ \"$1\" = nsfisis ]; then \
+ git config user.name nsfisis && git config user.email nsfisis@gmail.com; \
+ elif [ \"$1\" = \"\" ]; then \
+ echo \"usage: git config-user <user>\" >&2; \
+ else \
+ echo \"unknown user: $1\" >&2; \
+ fi; \
+ }; __fn"