forked from csswizardry/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
90 lines (90 loc) · 2.64 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
[user]
name = Harry Roberts
email = [email protected]
signingkey = D237343A
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[color "status"]
added = green
changed = blue
untracked = red
[color "diff"]
meta = yellow
old = red
new = green
[log]
# Better date formats in logs
date = rfc
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
# James Brown version control!
up = push
down = pull
# Sneak changes into your previous commit
sneak = commit -a --amend --no-edit
# Undo the last commit, but preserve the staging area
undo = reset --soft HEAD^
# It’s nice to be nice
praise = blame
who = blame
# Set upstream tracking much faster
publish = "! git push -u origin $(git rev-parse --abbrev-ref HEAD)"
# Show number of commits from all authors.
stats = shortlog -sn --all --no-merges
# Show detailed logs
graph = log --graph --decorate --stat --date=iso --all
# See everything everyone has done recently
overview = log --oneline --no-merges
# See everything I have done recently
recap = log --oneline --no-merges [email protected]
# Show very last commit
last = log --oneline -1
# See today’s work
today = log --since=\"00:00:00\" --all --no-merges --oneline [email protected]
# Empty line between results from different files.
find = "!git grep --break -C1"
# Show your ten most recently checked out branches
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
# Compare commits in one branch against another, e.g. $ git compare tkt-0021 to develop
compare = "!f() { git log --oneline $1..$2; }; f"
# See which commits are on your local branch that aren’t on the remote
local = "! git log --oneline --no-merges origin/$(git rev-parse --abbrev-ref HEAD).."
# See which commits are on the remote that aren’t on your local branch
upstream = "! git fetch && git log --oneline --no-merges ..origin/$(git rev-parse --abbrev-ref HEAD)"
# Nicer diffs for prose
wdiff = diff --word-diff
# Make it possible to diff minified code (eww…)
mindiff = diff -w --word-diff-regex=. --color-words -U0
[core]
editor = vim
excludesfile = ~/.gitignore
whitespace = warn
[push]
default = current
[github]
user = csswizardry
[ghi]
token = !security find-internet-password -a csswizardry -s github.com -l 'ghi token' -w
[commit]
template = /Users/harryroberts/.git-commit-template
gpgsign = true
[diff]
tool = vimdiff
[difftool]
prompt = false
[help]
autocorrect = 1
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
keepBackup = false