Skip to content

Instantly share code, notes, and snippets.

@othree
Created March 24, 2017 06:39
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 othree/eaba7b4286ba5cf43e59667f4434b274 to your computer and use it in GitHub Desktop.
Save othree/eaba7b4286ba5cf43e59667f4434b274 to your computer and use it in GitHub Desktop.
# https://gist.github.com/cpjolicoeur/8864444
bind generic f !@git fetch
bind generic p !@git pull
bind generic P !@git push
bind generic { !?git push -f
bind generic r !git rebase -i master
bind generic U !@sh -c "git checkout master && git pull && git checkout - && git rebase master"
bind generic M !@git checkout master
bind generic ! !@git reset HEAD^
bind generic @ !@?git reset --hard HEAD^
bind generic a !git commit --amend
bind branch n !@git checkout -b aes/%(prompt) # Create and checkout a new branch
bind branch c !@git checkout %(branch)
bind branch Backspace !@?git branch -d %(branch)
bind tree V !subl %(file)
bind tree c !@sh -c "git show %(branch):%(file) | pbcopy"
bind tree x !@sh -c "git show %(branch):%(file) > %(file)"
# set show-author = abbreviated
# set author-width = 7
# set show-date = false
# general
color default 15 235
color cursor 15 241
color title-focus 242 221
color title-blur 242 221
color delimiter 213 default
color author 156 default
color date 81 default
color line-number 221 default
color mode 255 default
# main
color main-tag 213 default bold
color main-local-tag 213 default
color main-remote 221 default
color main-replace 81 default
color main-tracked 221 default bold
color main-ref 81 default
color main-head 213 default bold
color graph-commit 226 default
# color main_revgraph 81 default
# status
#color stat-head 81 default
# Diff colors
color diff_add 10 default
color diff_add2 10 default
color diff_del 196 default
color diff_del2 196 default
color diff-header 221 default
color diff-index 81 default
color diff-chunk 213 default
color diff_oldmode 221 default
color diff_newmode 221 default
color 'deleted file mode' 221 default
color 'copy from' 223 default
color 'copy to' 221 default
color 'rename from' 221 default
color 'rename to' 221 default
color diff_similarity 221 default
color 'dissimilarity ' 221 default
color 'diff-tree ' 81 default
color diff-stat 81 default
color 'Reported-by:' 156 default
color 'Author:' 156 default
color 'Commit:' 213 default
color 'AuthorDate:' 221 default
color 'CommitDate:' 221 default
color 'Date:' 81 default
color pp_refs 213 default
color palette-0 226 default
color palette-1 213 default
color palette-2 118 default
color palette-3 51 default
color palette-4 196 default
color palette-5 219 default
color palette-6 190 default
# status
color status.header 221 default
color status.section 81 default
color stat_staged 213 default
color stat_unstaged 213 default
color stat_untracked 213 default
# raw commit header
color commit 156 default
color committer 213 default
# commit message
color 'Signed-off-by' 221 default
color 'Acked-by' 221 default
color 'Tested-by' 221 default
color 'Reviewed-by' 221 default
# tree
color tree.directory 221 default
# LINE(PALETTE_0, "", COLOR_MAGENTA, COLOR_DEFAULT, 0), \
# LINE(PALETTE_1, "", COLOR_YELLOW, COLOR_DEFAULT, 0), \
# LINE(PALETTE_2, "", COLOR_CYAN, COLOR_DEFAULT, 0), \
# LINE(PALETTE_3, "", COLOR_GREEN, COLOR_DEFAULT, 0), \
# LINE(PALETTE_4, "", COLOR_DEFAULT, COLOR_DEFAULT, 0), \
# LINE(PALETTE_5, "", COLOR_WHITE, COLOR_DEFAULT, 0), \
# LINE(PALETTE_6, "", COLOR_RED, )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment