Skip to content

Instantly share code, notes, and snippets.

@rrennick
Last active December 31, 2018 15:21
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 rrennick/5171259 to your computer and use it in GitHub Desktop.
Save rrennick/5171259 to your computer and use it in GitHub Desktop.
Linux/Mac command line for reverting file modification changes that have not been committed. Does not include removing files that were added to the repo.Originally posted at https://gist.github.com/anonymous/5171214 because I didn't know you had to re-login into the gist site when already logged into github.
for F in `git status | grep modified | cut -f4 -d' '` ; do git checkout -- $F ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment