Skip to content

Instantly share code, notes, and snippets.

@strawberryjello
Created February 10, 2015 11:30
Show Gist options
  • Save strawberryjello/f27fc782a2a440c63751 to your computer and use it in GitHub Desktop.
Save strawberryjello/f27fc782a2a440c63751 to your computer and use it in GitHub Desktop.
Echo list of files returned by git status --porcelain (minus status code)
#!/usr/bin/env bash
# meant to be run in the repo top directory
IN=`git status --porcelain | cut -c4-`
arr=$(echo $IN)
for x in $arr
do
echo $x
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment