Init commit
This commit is contained in:
18
repo-cleanup.sh
Executable file
18
repo-cleanup.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
repository="$(dirname "$(readlink -f "$0")")/."
|
||||
|
||||
cd "${repository}"
|
||||
git rev-parse --is-inside-work-tree >/dev/null
|
||||
|
||||
git clean -dfX --dry-run "${repository}"
|
||||
|
||||
printf "\nExecute [Y,N]?"; read -r yn
|
||||
if [ "$yn" = "${yn#[Yy]}" ]; then
|
||||
echo "Aborting cleanup..."
|
||||
else
|
||||
git clean -dfX "${repository}"
|
||||
echo "Done."
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user