forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
117 lines (116 loc) · 4.5 KB
/
.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[alias]
# Setting up a brand new branch with abnormal branching name
abnormal = "!f() { git checkout -b \"assweet/pr/$1\" 2> /dev/null || git checkout \"assweet/pr/$1\"; }; f"
abwt = "!f() { git worktree add -b \"assweet/pr/$1\" \"${SOURCE}/../$1\" && cd \"${SOURCE}/../$1\"; }; f"
abrmwt = "!f() { git worktree remove --force \"${SOURCE}/../$1\" && git branch -D \"assweet/pr/$1\"; }; f"
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
# clean default
c = clean -xdf --exclude=.idea --exclude=ops
# Commit all changes
ca = !git add -A && git commit -av
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=format:'%C(auto,166)%h%Creset %C(auto,125)%aI%Creset %C(auto,64)%al%Creset:%s' -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Pull in remote changes for the current repository and all its submodules
p = pull --recurse-submodules
# Push to remote
# po = push --force --set-upstream origin $(git branch | grep \\* | cut -d ' ' -f2)
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
# Use custom `.gitignore` and `.gitattributes`
attributesfile = ~/.gitattributes
excludesfile = ~/.gitignore
# Text viewer for use by Git commands (e.g., less).
pager = delta
# Prevent showing files whose names contain non-ASCII symbols as unversioned.
# http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
precomposeunicode = false
# Make `git rebase` safer on macOS
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
# Speed up commands involving untracked files such as `git status`.
# https://git-scm.com/docs/git-update-index#_untracked_cache
untrackedCache = true
# Treat spaces before tabs and all kinds of trailing whitespace as an error
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)043k43k
ui = auto
[commit]
# https://help.github.com/articles/signing-commits-using-gpg/
gpgsign = false
# template = /Users/st_lim/.gitmsg.txt
[delta]
features = mellow-barbet
hyperlinks = true
# hyperlinks-file-link-format = "idea://open?file={path}&line={line}"
hyperlinks-file-link-format = "goland://open?file={path}&line={line}"
line-numbers = true
navigate = true # use n and N to move between diff sections
side-by-side = true
[diff]
colorMoved = default
# Detect copies as well as renames
renames = copies
[diff "bin"]
# Use `hexdump` to diff binary files
textconv = hexdump -v -C
[help]
# Automatically correct and execute mistyped commands
autocorrect = 1
[include]
path = /Users/st_lim/.config/git-delta/themes.gitconfig
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = diff3
# Include summaries of merged commits in newly created merge commit messages
log = true
[push]
# https://git-scm.com/docs/git-config#git-config-pushdefault
default = simple
# Make `git push` push relevant annotated tags when pushing branches out.
followTags = true
autoSetupRemote = true
# URL shorthands
[url "[email protected]:"]
# Personal Access Token - ff400df05163d1969c39696cc5caf1b852cb64e9
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "[email protected]:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[user]
name = Lim Swee Tat
email = [email protected]
signingkey = EE1EF39C32152053
[credential]
helper = osxkeychain
[pull]
# ff = true
rebase = true
[gpg]
program = smimesign
format = x509
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f