diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-12-14 20:34:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-12-15 22:07:17 +0900 |
| commit | 6ff48cb27ed3c2e653021f5c4c6a32cce52b4081 (patch) | |
| tree | d51456216eb1c128605b220711a74c524d7a8db6 | |
| parent | c8132ddbb6baa7b2f1f3e9c2d297a25f1c1107d4 (diff) | |
| download | dotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.tar.gz dotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.tar.zst dotfiles-6ff48cb27ed3c2e653021f5c4c6a32cce52b4081.zip | |
git: add alias config-user
| -rw-r--r-- | .config/git/config | 9 |
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" |
