Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f2fe4641d1
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (19 sloc) 0.512 kB
#!/bin/sh
if [ ! -d `pwd`/.git ]; then
echo "Not in a git dir!"
exit 1
fi
OUTPUT=$(git status -s)
if [ -n "$OUTPUT" ]; then
echo "Modified files exist in the Git working tree."
exit 1
fi
OUTPUT=$(git clean -n -x -d)
if [ -n "$OUTPUT" ]; then
echo "Git repository not clean."
echo "Remove all unversioned files and directories."
exit 1
fi
echo "Updating `pwd` to the *null* revision."
find . ! -path './.git*' -delete
echo "To go back to the previous state, run: git reset --hard"
Jump to Line
Something went wrong with that request. Please try again.