-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
96 lines (70 loc) · 2.94 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
[user]
name = Bilal Syed Hussain
semail = [email protected]
bemail = [email protected]
email = [email protected]
[color]
ui = auto
[core]
excludesfile = /Users/bilalh/.gitignore
[alias]
st = status
cam = commit --amend -am
ch = checkout
pom = push origin master
ldiff = difftool -t latex
# Logs
lg = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --date=relative
ld = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%ai)%Creset'
lo = log --graph --pretty=format:'%Cred%h%Creset - %Cgreen(%cr) %C(bold blue)<%an>%Creset %s %C(yellow)%d%Creset ' --abbrev-commit --date=relative
# One line per commit
loa = log --graph --decorate --pretty=oneline --abbrev-commit --all
# commits not pushed to $1
unpushed = cherry -v
# what tag contains the sha
tag = name-rev --name-only
# what branch contains the sha
contains = branch --contains
# lost commits
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'"
# show a list of branches sorted by time of last commit
brage = "!f() { git for-each-ref --sort=committerdate refs/heads $1 --format=\"%(refname:short)\" ; }; g() { for C in $(f $1) ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; done; }; g "
# show remote branches as well
brageall = !git brage refs/remotes
# show a list of every branch and show there latests commit, sorted by last commit
brlog = "!sh -c 'for C in $(git for-each-ref --sort=committerdate refs/heads --format=\"%(refname:short)\") ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; git show -s $C ; echo; done'"
# url of origin, about 99% of what I use git config --list for
cloneurl = config --get remote.origin.url
icdiff = !git-icdiff
[core]
pager = less -FRSX
quotepath = false
editor = /Users/bilalh/bin/vim
[apply]
whitespace = fix
[gist]
private = yes
browse = yes
# [diff]
# tool = icdiff
# [difftool]
# prompt = no
[difftool.latex]
cmd = latexdiff \"$LOCAL\" \"$REMOTE\"
[difftool.icdiff]
cmd = icdiff --line-numbers \"$LOCAL\" \"$REMOTE\"
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool "sourcetree"]
cmd = /Applications/DiffMerge.app/Contents/MacOS/DiffMerge --nosplash \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/DiffMerge.app/Contents/MacOS/DiffMerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
trustExitCode = true
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[credential]
helper = osxkeychain
[push]
default = simple