Skip to content

Instantly share code, notes, and snippets.

@hallettj
Last active August 29, 2015 13:57
Show Gist options
  • Save hallettj/9749276 to your computer and use it in GitHub Desktop.
Save hallettj/9749276 to your computer and use it in GitHub Desktop.
tmux key bindings to run common git commands in a new split
# open vim in a new split
bind e split-window -h -c "#{pane_current_path}" sensible-editor
# shortcuts for common git operations
bind g split-window -h -c "#{pane_current_path}" 'GIT_PAGER="less -+F" git lg'
bind D split-window -h -c "#{pane_current_path}" 'GIT_PAGER="less -+F" git diff'
bind C split-window -h -c "#{pane_current_path}" 'GIT_PAGER="less -+F" git diff --cached'
bind A split-window -h -c "#{pane_current_path}" 'git add -p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment