Skip to content

Instantly share code, notes, and snippets.

View jochemhoorneman's full-sized avatar

jochemhoorneman

  • Lobster Robotics
  • Netherlands
View GitHub Profile
@jochemhoorneman
jochemhoorneman / git-glean-branches
Last active May 15, 2024 11:59 — forked from GrayedFox/git-glean
Remove local branches with a missing (gone) upstream
#!/usr/bin/env bash
SCRIPT_NAME="git-clean-branches.sh"
help_message() {
echo "Usage: $SCRIPT_NAME [ -i | -m | -f]"
echo " -i: interactive mode, the safest option: will prompt before deleting branches"
echo " -m: prune and delete merged branches"
echo " -f: prune and force delete branches"
}