-
Notifications
You must be signed in to change notification settings - Fork 1
/
.git.alias
51 lines (49 loc) · 1.45 KB
/
.git.alias
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
alias gbr="git br"
alias gco="git co"
alias gst="git st"
alias gdf="git df"
alias gdc="git dc"
alias gcm="git cm"
alias gsh="git sh"
alias gcp="git cp"
alias glc="git lc -25"
alias gla="git la -25"
alias glf="git lf -25"
alias gpl="git pull"
alias gps="git push"
#alias gst="git status -sb"
#alias glc="git log --abbrev-commit --graph --date=relative --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
#alias gla="glc --branches -20"
#alias glf="git log --abbrev-commit --parents --graph --oneline --name-status"
#
#__define_git_completion () {
# eval "
# _git_$2_shortcut () {
# COMP_LINE=\"git $2\${COMP_LINE#$1}\"
# let COMP_POINT+=$((4+${#2}-${#1}))
# COMP_WORDS=(git $2 \"\${COMP_WORDS[@]:1}\")
# let COMP_CWORD+=1
#
# local cur words cword prev
# _get_comp_words_by_ref -n =: cur words cword prev
# _git_$2
# }
# "
#}
#
#__git_shortcut () {
# type _git_$2_shortcut &>/dev/null || __define_git_completion $1 $2
# alias $1="git $2 $3"
# complete -o default -o nospace -F _git_$2_shortcut $1
#}
#
#__git_shortcut gsh show
#__git_shortcut gbr branch -vv
#__git_shortcut gco checkout
#__git_shortcut gdf diff -w
#__git_shortcut gad add
#__git_shortcut gcm commit -v
#__git_shortcut gpl pull
#__git_shortcut gps push
#__git_shortcut gcp cherry pick
#__git_shortcut glg log --abbrev-commit --parents