Created
February 1, 2011 08:46
-
-
Save jonmaim/805601 to your computer and use it in GitHub Desktop.
Git checkout every file with changed file properties (run it in root git dir).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git status --porcelain --untracked-files=no | awk '{if ($1 == "M") print;}' | cut -d " " -f 3-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git diff --summary | cut -d " " -f 7-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git checkout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment