-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_gitconfig
57 lines (55 loc) · 2.97 KB
/
dot_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
[user]
name = ebesson
email = etienne.besson@gmail.com
[gui]
[alias]
st = status
co = checkout
#Creer une nouvelle branche et swithc dessus
cob = checkout -b
ci = commit
ca = commit -a
br = branch
#affiche toutes les branches (locales et disantes)
bra = branch -a
#affiche les branches distantes
brr = branch -r
lg = log --pretty=format:'%h - %ar - %an - %s %C(bold red)%N%Creset%C(bold green)%d%Creset' --topo-order --graph
#lga affiche le message de commit en entier
lga = log --pretty=format:'%h - %ar - %an - %s %b %C(bold red)%N%Creset%C(bold green)%d%Creset' --topo-order --graph
#lgn affiche les logs avec les notes s'il y en a
lgn = log --pretty=format:'%h - %ar - %an - %s %C(bold red)%N%Creset%C(bold green)%d%Creset' --topo-order --graph --no-merges
#lgna affiche les logs avec message en entier + notes
lgna = log --pretty=format:'%h - %ar - %an - %s %b %C(bold red)%N%Creset%C(bold green)%d%Creset' --topo-order --graph --no-merges
#permet de pousser une nouvelle branche sur le repo distant et de lier la branche locale a la branche distante
puu = push -u
fa = fetch --all
rh = reset --hard
#merge une branche sur la branche courante en la rebasant au prealable avec celle-ci
mm = !sh -c 'CUR_BRA=$(cat .git/HEAD | cut -d/ -f3) && git pull && git checkout "${1}" && git rebase ${CUR_BRA} && git checkout "${CUR_BRA}" && git merge --no-ff "${1}"' -
mnf = merge --no-ff
mnfc = merge --no-ff --no-commit
#prepare une branche hotfix a partir de la master
hot = "!sh -c 'git co master && git pull && [ $(git branch | grep -c hotfix) -eq "0" ] && git branch hotfix; git co hotfix && git rebase master'"
#raccourci stash
ssave = stash save
spop = stash pop
slist = stash list
sapply = stash apply
#affiche les parents d'un commit
parents = cat-file commit
#liste les tags avec leur annotations
ltag = tag -l -n10
lol=log --abbrev-commit --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ls=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit --decorate
ll=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit --decorate --numstat
lds=log --color --graph --pretty=format:'%Cred%h% %ad%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit --decorate --date=short
[color]
ui = true
[push]
default = upstream
autoSetupRemote = true
[branch]
autosetuprebase=always
[core]
editor = 'vim'