-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.gitconfig
More file actions
130 lines (107 loc) · 3.28 KB
/
Copy path.gitconfig
File metadata and controls
130 lines (107 loc) · 3.28 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[user]
name = Harry Roberts
email = csswizardry@gmail.com
signingkey = D237343A
[core]
editor = vim
excludesfile = ~/.gitignore
pager = less
attributesfile = /Users/harryroberts/.gitattributes
[commit]
template = /Users/harryroberts/.git-commit-template
gpgsign = true
verbose = true
[fetch]
prune = true
[pull]
rebase = false
[push]
default = current
autoSetupRemote = true
[apply]
whitespace = warn
[color]
ui = auto
pager = true
[log]
# Better date formats in logs
date = rfc
# Show tags etc. in logs
decorate = short
[help]
autocorrect = prompt
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff
conflictstyle = zdiff3
[mergetool]
keepBackup = false
[github]
user = csswizardry
[ghi]
token = !security find-internet-password -a csswizardry -s github.com -l 'ghi token' -w
[alias]
# Everyday shorthand
# Terser statuses that show branch info
st = status -sb
ci = commit
br = branch
co = checkout
df = diff
# Push and pull
# James Brown version control!
up = push
down = pull
# Set upstream tracking much faster
publish = "! git push -u origin $(git rev-parse --abbrev-ref HEAD)"
# Commit manipulation
# 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^
# History and inspection
# See everything everyone has done recently
overview = log --oneline --no-merges
# Show detailed logs
graph = log --graph --decorate --stat --date=iso --all
# Show very last commit
last = log --oneline -1
# Show our last tag
last-tag = describe --abbrev=0 --tags
# See the timestamp of a given commit
when = show -s --format=%ci
# See only which files have changed in a git show, not the whole diff
files = show --pretty=\"\" --name-only
# Empty line between results from different files.
find = "!git grep --break -C1"
# It’s nice to be nice
praise = blame
who = blame
# Personal activity
# Show number of commits from all authors.
stats = shortlog -sn --all --no-merges
# See everything I have done recently
remind = log --oneline --no-merges --author=csswizardry@gmail.com
# See today’s work
today = log --since=\"00:00:00\" --all --no-merges --oneline --author=csswizardry@gmail.com
# See yesterday’s work
yesterday = log --since='yesterday.midnight' --until='midnight' --all --no-merges --oneline --author=csswizardry@gmail.com
# Branches and upstreams
# 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 = log --oneline --no-merges @{upstream}..
# See which commits are on the remote that aren’t on your local branch
upstream = "!git fetch && git log --oneline --no-merges ..@{upstream}"
# Specialist diffs
# 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
# Repository navigation
root = rev-parse --show-toplevel