Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Watkins benwtks

View GitHub Profile
View blog.sh
#!/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
View which-key.vim
" 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 / commands.md
Last active Apr 28, 2020
Useful git commands
View commands.md

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)