How to Quickly Revert Changes in Git
Sometimes you experiment with a new feature and you decide not to use a certain library or an approach. You need to revert back to the previous working version. I was working with flip.js jQuery plugin and decided not to use it. The git status shows the files that were modified.
You can list only the modified files like this:
You can now combine
xargs with this output to revert your changes.
$git ls-files -m | xargs git checkout $git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean