Skip to content

Instantly share code, notes, and snippets.

@bratsche
Last active December 15, 2016 16:11
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 bratsche/8d75ab4f79fbef83c3cd848f6ca2ff24 to your computer and use it in GitHub Desktop.
Save bratsche/8d75ab4f79fbef83c3cd848f6ca2ff24 to your computer and use it in GitHub Desktop.
Differentiate between modified and unmodified files
git ls-files | while read -r line; do
s=$(git status -s "$line");
if [ -n "$s" ]; then
echo "$s";
else
echo " $line";
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment