View git-delete-branches-older-than-period
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
:' | |
This is an automated bash script to delete git branches older than some specific time period. | |
The default set time is 3 months, but you can pass the period in months as a first parameter while running the shell script | |
' | |
declare -i numberOfMonths=3 # Declare the default period in months | |
declare blackListedBranches # Blacklisted branches | |
clear=clear # Command to clear terminal | |
ECHO='echo ' # Custom echo |