-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
84 lines (63 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
[alias]
ca = commit --amend
st = status
br = branch
cm = checkout master
st = status -sb
amend = commit --amend
pom = push origin master -u
ps = push
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
stb = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
rollback = reset --soft HEAD~1
# Who am I? IT'S A ME, MARIO! :)
me = config user.name
# Checkout master
cm = checkout master
# Checkout staging
cs = checkout staging
# Checkout development
cd = checkout development
# Push master
pm = !(git push -u origin master)
# Push staging
psg = !(git push -u origin staging)
# Push development
pd = !(git push -u origin development)
# Syncronize local branchs with remote
fe = fetch origin
# Fork a branch
fork = checkout -b
# Complete pull (with submodules)
pull-sub = !(git pull && git submodule foreach git pull origin master)
# Pretty log
lcgg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# Remote commits ahead of mine
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
# Remote commits ahead of local
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
# The missing command <3
unstage = reset HEAD --
# Undo modifications to a file
undo = checkout --
# Last 24 hours commits
standup = !(git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --since yesterday --author "$(git me)")
# Review commits before pushing
ready = rebase -i @{u}
# Branchs hier
hier = log --all --graph --decorate --oneline --simplify-by-decoration
# Create a package
package = !(GZIP=-9 tar --exclude=".git/" -zcvf ../$(basename "$PWD")_$(date +"%Y-%m-%d_%H-%M-%S").tar.gz *)
# Resolve conflict using ours
resolve-ours = !(grep -lr '<<<<<<<' . | xargs git checkout --ours)
# Resolve conflict using theirs
resolve-theirs = !(grep -lr '<<<<<<<' . | xargs git checkout --theirs)
# List committers
committers = !(git log | grep Author | sort | uniq -c | sort -n -r)