forked from samerbuna/.files
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig.sh
executable file
·53 lines (45 loc) · 2.34 KB
/
gitconfig.sh
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
git config --global alias.a "add -A"
git config --global alias.aa "!git add -A . && git status"
git config --global alias.ap "add --patch"
git config --global alias.next "!git add -A . && git rebase --continue"
git config --global alias.b "branch"
git config --global alias.br "branch -v"
git config --global alias.c "commit"
git config --global alias.ca "commit -a"
git config --global alias.amend "commit --amend"
git config --global alias.co "checkout"
git config --global alias.cp "cherry-pick"
git config --global alias.nb "checkout -b"
git config --global alias.uncommit "reset --soft HEAD^"
git config --global alias.unstage "reset HEAD"
git config --global alias.where "branch -a --contains"
git config --global alias.d "diff"
git config --global alias.ds "diff --staged"
git config --global alias.s "status -sb"
git config --global alias.st "status"
git config --global alias.filelog "log -u"
git config --global alias.short "log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\""
git config --global alias.l "log --decorate --graph --date=short"
git config --global alias.cb "name-rev --name-only HEAD"
git config --global alias.f "fetch"
git config --global alias.mt "mergetool"
git config --global alias.pl "pull"
git config --global alias.ps "push"
git config --global alias.r "remote -v"
git config --global alias.t "tag -n"
git config --global alias.sa "stash apply"
git config --global alias.sa "stash pop"
git config --global alias.sl "stash list"
git config --global alias.ss "stash save"
git config --global alias.track "for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads"
git config --global alias.lc "!git log origin/\$(git name-rev --name-only HEAD).."
git config --global alias.rc "!git log ..origin/\$(git name-rev --name-only HEAD)"
git config --global alias.rebase-new "!git rebase -i origin/\$(git name-rev --name-only HEAD)"
git config --global alias.edit-all "!vim \$(git status --short | awk '$1 ~ /^M$/ {print $2}')"
git config --global alias.wipe "!git reset --hard && git clean -df && git submodule init && git submodule update && git submodule foreach git clean -fd && git remote prune origin && git gc"
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
git config --global color.grep auto
git config --global push.default current