Skip to content

Instantly share code, notes, and snippets.

View azatoth's full-sized avatar

Carl Fürstenberg azatoth

  • Purple Scout AB
  • Malmö
View GitHub Profile
@azatoth
azatoth / git-delete-gone-branches
Last active December 2, 2022 13:27 — forked from GrayedFox/git-glean
Remove local branches with a missing (gone) upstream
#!/usr/bin/env bash
# reset environment variables that could interfere with normal usage
unset GREP_OPTIONS
#
# check whether current directory is inside a git repository
#
is_git_repo() {
git rev-parse --show-toplevel >/dev/null 2>&1