-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtigrc
26 lines (22 loc) · 1.25 KB
/
tigrc
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
# config file for tig
# See http://jonas.nitro.dk/tig/tigrc.5.html for config details
bind generic <Ctrl-r> !@zsh -c "git fetch && git merge --ff-only"
bind generic <Ctrl-f> scroll-page-down
bind generic <Ctrl-b> scroll-page-up
bind generic H move-first-line
bind generic L move-last-line
bind generic y !@zsh -c "echo -n %(commit) | pbcopy" # copy selected commit's SHA
bind generic b !@zsh -c "echo -n %(branch) | pbcopy" # copy selected commit's branch name
bind generic d !@zsh -c "git branch -d %(branch)" # remove the selected branch
bind generic D !@zsh -c "git branch -D %(branch)" # Force-remove the selected branch
bind generic c !@zsh -c "git checkout %(branch)" # Checkout the selected branch (even remote)
bind generic R !@zsh -c "git checkout HEAD^ && git branch -D %(branch) && git co %(branch)" # "re-checkout" a remote branch
bind generic T !@zsh -c "git trim"
bind generic s view-stash # regular mapping for this is 'y'
set ignore-case = smart-case
set refresh-mode = periodic
set refresh-interval = 3
set tab-size = 4
color cursor black green
# Override default main-view settings to show commit ids (hashes):
set main-view = id:yes date:relative-compact author:full commit-title:graph=v2,refs=yes