1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-07 00:05:10 +01:00
Files
dotfiles/bin/git_clean
2015-06-15 14:21:47 +02:00

16 lines
306 B
Bash
Executable File

#!/bin/bash
# Dry run, stating what files would be removed
git clean -d -x -n
read -r -p "Continue the real cleanup of the tree? [y/N] " -n 1 response
response=${response,,} # tolower
if [[ $response =~ ^(yes|y| ) ]]; then
echo
echo "Cleaning up"
git clean -d -x -f
else
echo
echo "Aborted"
fi