diff options
-rw-r--r-- | alias | 14 | ||||
-rw-r--r-- | tigrc | 3 |
2 files changed, 5 insertions, 12 deletions
@@ -66,20 +66,10 @@ alias df='df -h' | |||
66 | 66 | ||
67 | # git | 67 | # git |
68 | alias g='git' | 68 | alias g='git' |
69 | alias gls='git log -S' | ||
70 | alias gc='git clone' | 69 | alias gc='git clone' |
71 | alias gc1='git clone --depth=1' | 70 | alias gc1='git clone --depth=1' |
72 | alias check='git checkout' | 71 | alias gls='git log -S' |
73 | alias checkout='git checkout' | 72 | alias cdgs='cd `git submodule status | cut -d" " -f3`' # cd to first submodule |
74 | alias stash='git stash' | ||
75 | alias commit='git commit' | ||
76 | alias ca='git commit --amend' | ||
77 | alias branch='git branch' | ||
78 | alias pull='git pull' | ||
79 | alias merge='git merge' | ||
80 | alias push='git push' | ||
81 | alias remote='git remote -v' | ||
82 | alias rebase='git rebase' | ||
83 | 73 | ||
84 | # docker | 74 | # docker |
85 | alias dp='docker ps' | 75 | alias dp='docker ps' |
@@ -72,6 +72,7 @@ bind main <C-J> :move-next-merge | |||
72 | bind main <C-K> :move-prev-merge | 72 | bind main <C-K> :move-prev-merge |
73 | bind main gh :goto HEAD | 73 | bind main gh :goto HEAD |
74 | bind main ; :goto %(commit)^2 # go to second parent | 74 | bind main ; :goto %(commit)^2 # go to second parent |
75 | bind main 1 :goto $(git rev-list --all --children | grep "^%(commit)" | awk '{print $2}') | ||
75 | 76 | ||
76 | # branch | 77 | # branch |
77 | bind main b none | 78 | bind main b none |
@@ -135,6 +136,7 @@ bind main Tn @git tag "%(prompt Enter tag name: )" %(commit) | |||
135 | bind main TN !git tag "%(prompt Enter tag name: )" %(commit) -a | 136 | bind main TN !git tag "%(prompt Enter tag name: )" %(commit) -a |
136 | bind main Tm @sh -c 'git tag -d %(tag) && git tag "%(prompt Enter tag name: )" %(commit)' | 137 | bind main Tm @sh -c 'git tag -d %(tag) && git tag "%(prompt Enter tag name: )" %(commit)' |
137 | bind main TM @sh -c 'git cat-file -p %(tag) | sed -n \'6,$p\' | git tag -a -F - "%(prompt Enter tag name: )" && git tag -d %(tag)' | 138 | bind main TM @sh -c 'git cat-file -p %(tag) | sed -n \'6,$p\' | git tag -a -F - "%(prompt Enter tag name: )" && git tag -d %(tag)' |
139 | bind main Tc !git tag %(tag) %(tag)^{} -f -m "%(prompt Enter new content: )" | ||
138 | bind main Ts >tig show %(tag) | 140 | bind main Ts >tig show %(tag) |
139 | bind main Td @git tag -d "%(prompt Delete tag: )" | 141 | bind main Td @git tag -d "%(prompt Delete tag: )" |
140 | bind main pt ?git push %(remote) %(tag) | 142 | bind main pt ?git push %(remote) %(tag) |
@@ -220,6 +222,7 @@ bind status <C-O> ?git am %(file) | |||
220 | bind stash a ?git stash apply %(stash) | 222 | bind stash a ?git stash apply %(stash) |
221 | bind stash d ?>git stash drop %(stash) | 223 | bind stash d ?>git stash drop %(stash) |
222 | bind stash p ?>git stash pop %(stash) | 224 | bind stash p ?>git stash pop %(stash) |
225 | bind stash i +git rev-parse %(stash) | ||
223 | 226 | ||
224 | # rename a stash | 227 | # rename a stash |
225 | bind stash n @sh -c "git stash drop %(stash) | \ | 228 | bind stash n @sh -c "git stash drop %(stash) | \ |