This file contains hidden or 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
| [alias] | |
| cleanup = "!f() { for BRANCH in \"$@\"; do echo \"\n--- Executing cleanup for branch: $BRANCH ---\"; LOCAL_DELETED=0; REMOTE_DELETED=0; if git branch -d \"$BRANCH\" 2>/dev/null; then LOCAL_DELETED=1; elif git branch -D \"$BRANCH\" 2>/dev/null; then LOCAL_DELETED=1; fi; if git push origin --delete \"$BRANCH\" 2>/dev/null; then REMOTE_DELETED=1; fi; echo \"Cleanup report for branch '$BRANCH':\"; if [ $LOCAL_DELETED -eq 1 ]; then echo \" - [SUCCESS] Local branch deleted.\"; else echo \" - [SKIPPED] Local branch did not exist or was not deleted.\"; fi; if [ $REMOTE_DELETED -eq 1 ]; then echo \" - [SUCCESS] Remote branch deleted (origin/$BRANCH).\"; else echo \" - [SKIPPED] Remote branch did not exist or was not deleted.\"; fi; done; }; f" |
OlderNewer