This shell script is designed to identify any backup files present in a git repository, remove them from the repository (via
git rm) and optionally commit and push the changes.
Backup files are identified based on their file names ending with an underscore
_ following by a string that represents a date.
The following are examples of file names which will be matched by this script.
This script currently deals with
To get the backup deletion script,
cd to your project's directory and run the following
wget -N https://raw.githubusercontent.com/rapidwebltd/backup-deletion/master/backup-deletion.sh
Please note that you should download the script into a valid git repository. If you do not, it will refuse to run due to its destructive nature.
./backup-deletion.sh script from within your project's directory.
If you receive a
Permission denied error, you need to make the script executable with
chmod +x backup-deletion.sh.