-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
108 lines (83 loc) · 2.48 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
[user]
name = Eliezer Talón
[alias]
# Shortcuts
co = checkout
go = checkout -b
ci = commit
st = status
sm = submodule
br = branch -vv
pushf = push --force-with-lease
amend = commit --amend
# Credit an author on the latest commit.
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Custom logs
last = "!f() { git log -`if [ -z $1 ]; then echo 1; else echo $1; fi` HEAD; }; f"
plog = log --pretty=\"%C(auto)%h%d %s (%C(green)%ci%C(reset))\" --date=\"format:yyyy-MM-dd HH:mm\"
smartlog = log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset'
# Editing workspace
rename = branch -M
brd = branch -d
discard = checkout --
unstage = reset HEAD --
scrub = "!f() { git checkout -- . && git clean -fd; }; f"
reset-last = reset --soft HEAD~
retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# Maintenance
prune-remote = "!f() { git remote | xargs git remote prune; }; f"
sync = "!f() { git pull && git prune-remote; }; f"
sync-submodules = "!f() git sm foreach --recursive git sync"
# Stats
tags = tag -ln
remotes = remote -v
contributors = shortlog -s -n
whoami = config user.email
[apply]
whitespace = fix
[core]
excludesfile = ~/.gitignore
editor = vim
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on macOS
# 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
[color]
ui = auto
[diff]
renames = copies
algorithm = histogram
colorMoved = default
colorMovedWS = allow-indentation-change
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[merge]
log = true
[credential]
helper = osxkeychain
[github]
user = elitalon
[pull]
rebase = false
[push]
default = simple
followTags = true
[rebase]
updateRefs = true
[rerere]
enabled = true
[fetch]
prune = true
prunetags = true
[help]
autocorrect = 10
[advice]
addIgnoredFile = false
[init]
defaultBranch = main