Skip to content

Instantly share code, notes, and snippets.

View FBen3's full-sized avatar

Benjamin Fockter FBen3

View GitHub Profile
@FBen3
FBen3 / git-branch-cleanup.sh
Created April 22, 2025 14:00
git-branch-cleanup
#!/bin/sh
set -euo pipefail
git fetch --prune
git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
git branch --merged | grep -vE '^\*|main|master|develop' | xargs git branch -d
@FBen3
FBen3 / git-branch-table.sh
Last active April 9, 2025 21:56
Custom Git Branch output
#!/bin/sh
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
# Column widths