-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
94 lines (75 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
[user]
name = Aaron Lake
email = [email protected]
[alias]
c = commit -am
up = pull
p = push
s = status -s
df = diff --color --color-words --abbrev
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
# from http://blog.kfish.org/2010/04/git-lola.html
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ll = log --graph --date=short
# from https://git.wiki.kernel.org/index.php/Aliases
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
#from http://serverfault.com/questions/175052/how-to-tell-which-local-branch-is-tracking-which-remote-branch-in-git
upstream = rev-parse --symbolic-full-name --abbrev-ref HEAD@{upstream}
# what got pushed to master in the last hour
# based on http://stackoverflow.com/questions/3357219/expose-the-date-a-commit-was-pushed-to-a-repository
justpushed = log origin/master@{\"1 hour ago\"}..origin/master --
# from https://gist.github.com/492227
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 a list of tags sorted by when they were tagged
tagage = "!sh -c 'git for-each-ref --sort=taggerdate refs/tags --format=\"%(refname:short)\"'"
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
diff = auto
status = auto
branch = auto
interactive = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[apply]
whitespace = fix
[core]
# Use custom `.gitignore` and `.gitattributes`
excludesfile = /home/alake/.gitignore_global
attributesfile = ~/.gitattributes
# Treat spaces before tabs, lines that are indented with 8 or more spaces, and all kinds of trailing whitespace as an error
whitespace = space-before-tab,indent-with-non-tab,trailing-space
[hub]
protocol = https
[credential]
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[push]
default = matching
# [url "ssh://[email protected]/"]
# insteadOf = https://github.com/
[init]
defaultBranch = main
[credential "https://github.com"]
helper =
helper = !gh auth git-credential