-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitconfig
61 lines (45 loc) · 2.39 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
[user]
name = Rob Howard
email = rob@robhoward.id.au
[core]
excludesfile = ~/.gitignore_global
editor = /usr/bin/env vim
[commit]
verbose = true # Include the commit diff in the chunk of stuff git preloads into the editor
[diff]
colorMoved = plain # Show moved blocks in a different colour to added+removed blocks
colorWords = true # Word diffs
[difftool "vimdiff"]
cmd = vimdiff -c ':colorscheme ron' $LOCAL $REMOTE
[log]
decorate = full # Show if a commit is the head of remote or local branch
[merge]
renameLimit = 10000 # The number of files to consider when figuring out when files have been renamed.
conflictstyle = diff3 # A three-part diff: shows ours, original, and theirs; see https://stackoverflow.com/q/27417656
[pull]
ff = only # No accidental merges when 'git pull'-ing
[push]
followTags = true # Also push tags associated with commits being pushed; disable with 'git push --no-follow-tags'
[stash]
showPatch = true # 'git show stash' shows the diff, like 'git show stash@{0}'
[status]
submoduleSummary = true
[rebase]
autoStash = true
autoSquash = true
[alias]
co = checkout
copr = "!f() { git fetch origin pull/$1/head && git checkout pr/$1; }; f" # Running 'git copr 1234' checks out PR #1234
f = fetch -p
pc = push origin HEAD
pcf = push origin HEAD --force-with-lease
s = status
d = difftool -t vimdiff
csvdiff = diff --color-words --ignore-space-at-eol --word-diff-regex="[^[:space:],]+"
lgflat = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%cr)%C(reset) %C(white)%s%C(reset) %C(bold white)— %cn%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lgtree = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%cD%C(reset) %C(bold green)(%cr)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %cn%C(reset)' --abbrev-commit
lg = !"git lgflat"
recent = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
prune-all = !git remote | xargs -n 1 git remote prune
git = "!git" # Allows 'git git diff' et al to work, when Rob is being scatter-brained and types+pastes git.