-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgitconfig
95 lines (63 loc) · 2.24 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 = Daniel Sager
email = software@sager1.de
[core]
excludesfile = ~/.gitignore_global
autocrlf = input
[push]
default = current
[alias]
# status using the short format
s = status -s
# nice log views
l = log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
changes = log --name-status --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# list commits in reverse order, usefule for PR descriptions when invoked w/ a limit
commits = log --pretty=format:%B --reverse
# Remove merged branches
cleanup = "!f() { git checkout master; git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d; }; f"
# Update all branches by rebasing onto master
update-branches = "!f() { git branch --no-merged | cut -c 3- | for branch in $(cat); do git rebase master $branch; done; git checkout master; }; f"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# verbose branch & remote info
branches = "!git --no-pager branch -a"
remotes = "!git --no-pager remote -v"
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = yellow
changed = green
untracked = cyan
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[git-up "fetch"]
prune = true
all = true
[git-up "bundler"]
check = true
[includeIf "gitdir:~/src/work/"]
path = ~/.gitconfig_devex
[pull]
ff = only
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential