Git - Making your life Easier with Git: Pro Tips - configuration, subcommand, alias
Head First Git: A Learner’s Guide to Understanding Git from the Inside Out、 Raju Gandhi(著)、 O’Reilly Mediaの Chapter 8.(Making your life Easier with Git: #Pro Tips)、SHARPEN YOUR PENCIL(610/680)の解答を求めてみる。
入出力結果(Terminal, Zsh)
% git config --global alias.a add
% git config --global alias.loga 'log --oneline --graph --all'
% deactivate
% git config --global alias.c commit
% cat ~/.gitconfig
...
[alias]
a = add
loga = log --oneline --graph --all
c = commit
% git config --global alias.b branch
% git config --global alias.s status
% git config --global alias.sw switch
% cat ~/.gitconfig
# This is Git's per-user configuration file.
...
[alias]
a = add
loga = log --oneline --graph --all
c = commit
b = branch
s = status
sw = switch
%