Skip to content

Instantly share code, notes, and snippets.

@florentdestremau
Created April 13, 2016 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florentdestremau/9314c86ba175f54da1099d186bc9b092 to your computer and use it in GitHub Desktop.
Save florentdestremau/9314c86ba175f54da1099d186bc9b092 to your computer and use it in GitHub Desktop.
A simple tig custom config
# In status view, push to origin
bind status P !git push origin
# In status view, pull from origin
bind status L !git pull origin
# In any view, amend current commit
bind generic + !git commit --amend
# In status view, delete selected file
bind status D !@?rm %(file)
# In stash view, drop the selected stash:
bind stash D !?git stash drop %(stash)
# In stash view, apply the selected stash:
bind stash A !?git stash apply %(stash)
# In any view, open the selected commit on Github
bind generic B @sh -c "xdg-open 'https://'$(git remote -v | grep -Eo 'github.com[:/][^.]+' | head -1 | tr : /)'/commit/%(commit)'"
# In main view, revert the selected commit
bind main ! !?git revert %(commit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment