Skip to content

Instantly share code, notes, and snippets.

@HomenSimpsor
Last active December 14, 2015 07:19
Show Gist options
  • Save HomenSimpsor/5050046 to your computer and use it in GitHub Desktop.
Save HomenSimpsor/5050046 to your computer and use it in GitHub Desktop.
Edit the nth file currently modified and not staged for commit
vim $(git diff --name-only | sed -n '2 p')
git checkout -f $(git diff --name-only | sed -n '2 p')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment