Git - Making your life Easier with Git: Pro Tips - gitconfig
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)、EXERCISE(605/715)の解答を求めてみる。
入出力結果(Terminal, Zsh)
% ls -a
.
..
…
.gitconfig
…
% git config --global core.editor
code -w
%
% cat .gitconfig
# This is Git's per-user configuration file.
[user]
name = kamimura
email = kamimura@live.jp
[core]
editor = code -w
excludesfile = /Users/…/.gitignore_global
[push]
default = simple
[alias]
a = add
loga = log --oneline --graph --all
c = commit
b = branch
s = status
sw = switch
aliases = config --list --show-origin
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
%