-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
55 lines (52 loc) · 1.84 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
[user]
email = [email protected]
name = myname
[color]
branch = auto
ui = true
[core]
editor = vi
#editor = "subl -n -w"
## autocrlf = input
[alias]
## working on commits
# commit to previous commit
caa = commit -a --amend -C HEAD
ci = commit
co = checkout
cp = cherry-pick
dc = diff --cached
fix = caa
lg = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(cyan)(%ar)%C(reset) %C(auto)%d%C(reset)'
lgp = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(cyan)(%ar)%C(reset) %C(auto)%d%C(reset)' --first-parent
rb = rebase
rba = rebase --abort
rbi = rebase -i
rbc = rebase --continue
rbs = rebase --skip
## working on branches
br = branch
bn = "!git rev-parse --abbrev-ref HEAD" # branche name
clean-merged = !git branch --merged \
| grep -v \"\\*\" \
| xargs -n 1 git branch -d
publish = "!git push -u origin $(git bn)" # set upstream and push
## alternative to pull.rebase = true
# pullr = pull --rebase
pushf = push --force
sync = rebase origin/develop
unpublish = "!git push origin :$(git bn)" # delete remote
whatsnew = "!git diff origin/$(git bn)...HEAD"
whatscoming = "!git diff HEAD...origin/$(git bn)"
# exemple d'alias avec paramètres
#foo = "!f() { echo $3 $2 $1; }; f"
# misc
rz = reset --hard
rza = !git reset --hard HEAD && git clean -df
st = status
[pull]
rebase = true
[push]
default = simple
[fetch]
prune = true