Git config 推薦設定方式

以下為我的 gitconfig, 設定完後操作 git 比較快速
存放位置為 ~/.gitconfig

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[user]
name = xxx
email = xxx@xxx.com
[core]
editor = vim
[color]
ui = true
[alias]
st = status
co = checkout
br = branch
cm = commit
au = add --update
cmi = commit -m "init"
cmu = commit -m "update"
cmf = commit -m "fixup"
cmt = commit -m "temp"
cmam = commit --amend
ls = ls-files
glog = log --oneline --graph --decorate
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
cmd = meld $LOCAL $REMOTE