Skip to content

Instantly share code, notes, and snippets.

@nyarly
Created July 15, 2014 22:57
Show Gist options
  • Save nyarly/ca6a5e8af157181fe3d0 to your computer and use it in GitHub Desktop.
Save nyarly/ca6a5e8af157181fe3d0 to your computer and use it in GitHub Desktop.
if git status --porcelain | grep '^\?'; then
echo "Error: These files are untracked. Add them to the repo or to .gitignore"
exit 1
fi
@nyarly
Copy link
Author

nyarly commented Jul 15, 2014

Ensures that everything is either added or ignored before commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment