forked from scrubmx/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
95 lines (95 loc) · 3.58 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
[user]
name = Jorge González
email = [email protected]
[github]
user = scrubmx
[core]
# editor = code --wait
editor = nvim
excludesfile = ~/.gitignore_global
pager = /usr/local/bin/diff-so-fancy | less --chop-long-lines -M +Gg
[init]
defaultBranch = main
[log]
date = relative
decorate = short
abbrevCommit = true
[commit]
template = ~/.gitmessage
[alias]
br = branch
co = checkout
cm = commit -v
dt = difftool
st = status
d = diff HEAD -- . ':!public/css/*' ':!public/js/*' ':!public/fonts/*' ':!public/mix-manifest.json' ':!package-lock.json' ':!yarn.lock' ':!npm-shrinkwrap.json' ':!composer.lock*'
lol = log --graph --author-date-order --pretty=format:'%C(blue)%h%C(auto)%d %C(green)(%cr) %C(dim white)by %C(reset)%C(cyan)%an %C(white)%s %C(reset)'
append = commit --amend --no-edit
branches = branch --sort=-committerdate -vv
changed = whatchanged -p --name-only --since='7 days ago' --pretty=format:'%C(yellow)%h %C(green)%cr%C(red)%d%C(reset) %s %C(blue)[%an]%C(reset)'
conflicts = diff --diff-filter=U
hash = rev-parse --short --verify HEAD
last = diff --cached HEAD^
remotes = remote -v
stashes = stash list --pretty=format:'%C(yellow)%gd %C(green)%ar%C(reset) %gs'
unstage = reset HEAD --
wip = commit --no-verify --no-gpg-sign -m WIP
cleanup = ! git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
list = ! git config -l | grep "alias" | cut -c 7-
ours = ! git checkout --ours $@ && git add $@
theirs = ! git checkout --theirs $@ && git add $@
search = ! git log -i --perl-regexp --all --color --graph --author-date-order --pretty=format:'%C(blue)%h%C(auto)%d %C(green)(%cr) %C(dim white)by %C(reset)%C(cyan)%an %C(white)%s %C(reset)' --grep="\"$@\"" -- .
sync-branches = ! git for-each-ref --format '%(refname:short):%(upstream:short)' 'refs/heads' | egrep -v ':$'
sync-ready = ! git --no-pager diff-index --stat --name-status --color --exit-code HEAD -- || (echo "Your working directory is dirty." && exit 1)
sync = "!f() { \
git sync-ready || { echo 'Please commit your changes or stash them before you sync branches.'; echo 'Aborting'; exit 1; }; \
current=$(git rev-parse --abbrev-ref HEAD); \
git fetch --all; \
git sync-branches | while IFS=: read local remote; do echo \"Merging $local with $remote\"; git checkout \"$local\" ; git merge --ff-only \"$remote\"; echo '\n'; done; \
git checkout $current; \
}; f(); unset f"
[color]
ui = true
status = auto
branch = auto
diff = auto
showbranch = auto
interactive = auto
sh = auto
[color "sh"]
branch = yellow reverse
workdir = blue bold
dirty = red
[color "diff"]
meta = magenta bold
frag = blue bold
whitespace = black reverse
[color "status"]
added = green
deleted = red
changed = yellow
untracked = cyan
branch = blue bold
#[push]
# https://git-scm.com/docs/git-config#git-config-pushdefault
# default = upstream
# default = simple
#[diff]
# tool = kaleidoscope
#[difftool]
# prompt = false
#[difftool "kaleidoscope"]
# cmd = /Applications/Kaleidoscope.app/Contents/Resources/bin/ksdiff --wait "$LOCAL" "$REMOTE"
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true