# ref: # https://qiita.com/sfus/items/063797a1dd8fdc7d032f # https://github.com/jonas/tig/wiki/Bindings # geineric bind generic x :toggle id bind generic 9 !@sh -c "echo -n %(commit) | head -c7 | xclip -selection c" bind generic g none bind generic gg move-first-line bind generic gr view-grep bind generic G move-last-line bind generic w :toggle ignore-case set ignore-case = true set line-graphics = utf-8 set refresh-mode = after-command # main view bind main gG :toggle commit-title-graph bind main G move-last-line bind main c @sh -c "git branch --points-at=%(commit) | \ sed -n '/^*/ {n;p}' | \ (cat -; echo %(commit)) | \ head -1 | \ xargs git checkout" bind main T @git tag "%(prompt Enter tag name: )" %(commit) bind main gdt @git tag -d %(tag) bind main !?git rebase -i %(commit) bind main m ?git merge %(commit) bind main P ?git push bind main b @git checkout -b "%(prompt Enter branch name: )" bind main B !sh scripts/bump_version.sh bind main V @git log -S "%(prompt Enter search word: )" bind main gdb !git branch -d "%(prompt Delete branch: )" bind main gDb ?git branch -D "%(prompt Delete branch anyway: )" bind main gsr ?git reset %(commit) --soft bind main ghr ?git reset %(commit) --hard set main-view = \ date:default \ author:abbreviated \ id \ commit-title:graph=v2,refs=true # blame view set blame-view-file-name = no set blame-view-line-number = yes,interval=5 # status view bind status s ?git stash bind status S @git stash save "%(prompt Enter stash name: )" bind status p ?git stash pop bind status D ?rm %(file) bind status a ?git commit --amend bind status j :/^[MADRU?] bind status k :?^[MADRU?] # stash view bind stash D ?git stash drop %(stash) bind stash a ?git stash apply %(stash) # refs view bind refs C none bind refs c ?git checkout %(branch) bind refs d @git branch -d %(branch) bind refs b @git branch %(branch) %(commit) # color color diff-header black yellow color diff-chunk white magenta bind status !sh -c "git difftool -y \"$(git rev-parse --show-toplevel)/%(file)\""