dotfiles/.local/bin/git-rmgonebranches
xerus2000 e2faef48d6 config/git: move branching aliases to bins and update logging
- disabled git reset --hard
- improved lno to conditionally use newlines
- get git-dir appropriately
2020-11-14 02:05:51 +01:00

6 lines
225 B
Bash
Executable file

#!/bin/sh
# Cleans up remote branches and removes branches where the remote-tracking branches got removed.
git fetch -p &&
for branch in `git branch -vv | grep ": gone]" | cut -d" " -f3`
do git branch -D "$branch"
done