-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
77 lines (76 loc) · 2.52 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
[user]
name = Eric Siegel
email = [email protected]
[core]
editor = /usr/local/bin/vim
excludesfile = ~/.gitignore
[alias]
ancestor = merge-base MASTER HEAD
br = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
ci = commit
co = checkout
dump = cat-file -p
grepAll = "!f() { \
PATTERNS=""; \
for pattern in "$@"; do \
PATTERNS+=\" -e ${pattern}\"; \
done; \
git --no-pager grep --all-match -l -E -i $PATTERNS; \
}; f"
hist = log --branches --remotes --tags --graph --oneline --decorate --date=relative --pretty=tformat:'%Cred%h%Cgreen %ad%Creset | %s%d [%an]'
oldest-ancestor = !zsh -c 'diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1' -
show-deleted = "!f() { \
latest_revision=$(git rev-list --max-count=1 --all -- \"*$1\"); \
path=$(git show --name-status --oneline $latest_revision | egrep '^(M|D|A)' | cut -f 2 | egrep \".*$1\" | head -n 1); \
git show $latest_revision^:$path ; \
}; f"
st = status
stash-all = stash save --include-untracked
type = cat-file -t
# Forcefully perform a git command in the current repo and recursively in all submodules (regardless of exit status).
# NOTE: The command (after `git run`) must be in quotes
# Example: git run "git checkout master"
submodule-run = !sh -c '\
$@ && \
git submodule foreach --recursive \"$@ || :\" && \
:' -
[branch]
autosetuprebase = always
[color]
ui = auto
[diff]
compactionHeuristic = true
renameLimit = 999999
tool = icdiff
[difftool]
prompt = false
[difftool "icdiff"]
cmd = /opt/homebrew/bin/icdiff --line-numbers $LOCAL $REMOTE
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[interactive]
diffFilter = diff-so-fancy
[mergetool "sourcetree"]
cmd = /opt/homebrew-cask/Caskroom/sourcetree/2.0.4/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[merge]
conflictstyle = diff3
ff = only
renameLimit = 999999
[pager]
diff = diff-so-fancy | less
log = diff-so-fancy | less
show = diff-so-fancy | less
[push]
default = simple
followTags = true
[status]
showUntrackedFiles = all
[transfer]
fsckobjects = true
[web]
browser = open