Skip to content

Instantly share code, notes, and snippets.

@tarmstrong
Created January 2, 2014 22:06
Show Gist options
  • Save tarmstrong/8227922 to your computer and use it in GitHub Desktop.
Save tarmstrong/8227922 to your computer and use it in GitHub Desktop.
Open the files you modified in the HEAD commit in vim.
#!/usr/bin/env bash
LAST_COMMIT_FILES=$( git log -1 --numstat --pretty="%h" | tail -n +3 | awk '{print $3}' );
vim -p $LAST_COMMIT_FILES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment