-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
executable file
·94 lines (77 loc) · 2.76 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
91
92
93
94
[user]
email = [email protected]
name = David Spreekmeester
signingkey = 5ABED9AAFF326019
[core]
autocrlf = input
safecrlf = warn
editor = vim
fileMode = false
excludesfile = ~/.gitignore
[push]
default = upstream
[alias]
# Typos
cloen = clone
# Shortcuts
co = checkout
ci = commit
st = status
br = branch
amend = commit --amend -C HEAD
fixup = commit --fixup
squash = commit --squash
rh = reset --hard
# Pretty logs and diffs
l = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ai%Creset'
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --date=short
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%an]" --decorate --numstat
lastchange = log -p --follow -n 1
changelog = diff-tree --no-commit-id --name-only
dl = "!git ll -1"
dlc = diff --cached HEAD^
dif = "!git diff --color | sed -E \"s/^([^-+ ]*)[-+ ]/\\1/\" | less -r"
# Branches, publishing, tracking, rebasing
branch-name = "!git rev-parse --abbrev-ref HEAD"
track = "!f() { git branch --track $1 origin/$1 && git co $1; }; f"
publish = "!git push -u origin $(git branch-name)"
unpublish = "!git push origin :$(git branch-name)"
unstage = reset HEAD
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" -
ff = "!f() { git merge --ff-only $1 && git branch -d $1; }; f"
rename = "branch -m"
# Misc
alias = "!git config -l | grep alias | cut -c 7-"
tags = tag --sort=v:refname
tt = "!git tags | tail"
ctags = !.git/hooks/ctags
type = cat-file -t
dump = cat-file -p
pop = stash pop
feature = "!f() { git checkout -b 'feature/'$(git config user.name | cut -d' ' -f1 | awk '{print tolower($0)}')'-'$1; }; f"
hotfix = "!f() { [ x$# != x2 ]&&echo "Two arguments required!" >&2 || git checkout -b 'hotfix/'$(git config user.name | cut -d' ' -f1 | awk '{print tolower($0)}')'-'$1 $2; }; f"
branches = for-each-ref --sort=-committerdate --format=\"%(align:1,20)%(color:blue)%(authordate:relative)%(end)%(align:1,30)%(color:red)%(authorname)%(end)%(color:white)%(color:bold)%(refname:short)\" refs/remotes
[color]
ui = auto
[color "status"]
added = yellow
changed = "white yellow"
untracked = "white yellow"
branch = "white normal bold"
[mergetool]
keepBackup = true
[rerere]
enabled = 1
[commit]
gpgsign = true
[gpg]
program = gpg
[rebase]
autosquash = true
[remote "origin"]
prune = true
[url "[email protected]:"]
insteadOf = https://github.com/