-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
88 lines (75 loc) · 2.83 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
[commit]
template = ~/.gitmessage
gpgsign = true
[alias]
# current working tree status using the short format
s = status
# delete merged branches
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
ctags = !.git/hooks/ctags
# PULLS
# nice git pull
up = "!git remote update -p; git merge --ff-only @{u}"
ploh = pull origin HEAD
ploqa = pull origin release/qa
# COMMITS
ca = commit -S -a
caa = commit -S -a --amend
caw = commit -S -a --message=WIP
cm = commit -S -m
cam = commit -S -am
ap = add -p
# COMPARE DIFFS LOGS GRAPHS
d1 = diff HEAD~1
graph = log --graph --date=format:'%e %b %Y' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit
co = checkout
conflicts = !git diff --name-only | uniq | xargs vim
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))'
chom = checkout master
choqa = checkout release/qa
# show a nice log commit tree
l = log --pretty=oneline -n 20 --graph --abbrev-commit | less -r
# diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat --color=always" | less -r
# show top commiters
contributors = shortlog --summary --numbered
# ERRORS
undo = reset HEAD~1 --mixed
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
# PUSHES
po = push origin
poh = push origin HEAD
pof = push origin HEAD --force
pu = push upstream
# REBASES
ra = rebase --abort
rc = rebase --continue
rom = rebase -i origin/master
rum = rebase -i upstream/master
pr = pull --rebase
prom = pull --rebase origin master
proqa = pull --rebase origin release/qa
# FETCH
fo = fetch origin
fu = fetch upstream
r1 = reset HEAD~1
identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; git config user.signingkey \"$(git config user.$1.signingkey)\"; :"
[color]
ui = true
[core]
pager = less
[init]
templateDir = /home/seventh/.git-template
[user]
useConfigOnly = true
[user "github"]
name = Chess Seventh
email = [email protected]
signingkey = A7D05D40C1C0C0F4
[user "bmbitbucket"]
name = Francesco Piva
email = [email protected]
[user "gitlab"]
name = Chess Seventh
email = [email protected]
signingkey = 4FEA2BF1886E8EA6