Skip to content

Instantly share code, notes, and snippets.

View benwtks's full-sized avatar

Ben Watkins benwtks

View GitHub Profile
@benwtks
benwtks / commands.md
Last active April 25, 2023 15:40
Useful git commands

Useful git commands

Undo last unpushed commit without losing changes

git reset HEAD~1 --soft

Undo changes to a specific file

git checkout -- (file name)

@benwtks
benwtks / which-key.vim
Created February 20, 2020 19:03
which-key
" My which-key mappings
" Define prefix dictionary
let g:which_key_map = {
\ 'h': [':History', 'History'],
\ 'n': [':NERDTreeToggle', 'NERDTree toggle'],
\ 'u': [':MundoToggle', 'Undo tree'],
\ }
let g:which_key_map.b = {
@benwtks
benwtks / blog.sh
Created February 20, 2020 19:07
Tmux scripts
#!/bin/bash
cd ~/blog
tmux new -s Blog -d
tmux send-keys -t Blog 'git s' C-m
tmux rename-window -t Blog Zsh
tmux new-window -t Blog
tmux send-keys -t Blog 'vim' C-m
tmux rename-window -t Blog Vim