-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
40 lines (40 loc) · 1.25 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
[alias]
co = checkout
edit-untracked = "!f() { ${EDITOR} $(git untracked); }; f"
fix = "!f() { ${EDITOR} `git diff --name-only --diff-filter=U`; }; f"
fuck-it = "!git checkout -- $(git root)"
message = show -s --format=%B
root = rev-parse --show-toplevel
track = "!git branch --set-upstream-to=origin/$(git current) $(git current)"
tracking-push = "!git push -u origin $(git current)"
unstaged = diff --name-only
untracked = "!git ls-files --others --exclude-standard"
yolo = push --force-with-lease
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = blue bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[push]
default = simple
[fetch]
prune = true
[user]
name = "Nathan Seither"
email = "nathanseither@gmail.com"
[credential]
helper = osxkeychain
[hub]
protocol = https