-
Notifications
You must be signed in to change notification settings - Fork 98
/
gitconfig
59 lines (49 loc) · 1.67 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
[init]
templatedir = ~/.git_template
[push]
default = current
[color]
ui = auto
[alias]
aa = add --all
ci = commit -v
# Commit all changes
ca = !git add -A && git commit -av
# Add all changes to last commit
caa = !git add -A && git commit --amend -av
# Switch to a branch, creating it if necessary
co = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Rename local branch
rn = "!f() { git branch -m $1; }; f"
# Sync current branch by rebasing on top
scb = !git pull --rebase
# Sync current branch with mainline
up = "!f() { git branch --set-upstream-to origin/$1; }; f"
# View all branches, upstreams, info etc
vv = !git branch -vv
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# deploy a folder to gh-pages branch (public by default)
ghp = "!f() { git subtree push --prefix ${1:-public} origin gh-pages; }; f"
current-branch = !sh -c 'git rev-parse --abbrev-ref HEAD' -
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order
[core]
excludesfile = /Users/willcolb/.gitignore_global
autocrlf = input
pager = less -FMRiX
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[include]
path = ~/.gitconfig.local
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true