Skip to content

Instantly share code, notes, and snippets.

@boobo94
Created September 14, 2018 10:01
Show Gist options
  • Save boobo94/7423ed90af8d73d49a0915ef486b380b to your computer and use it in GitHub Desktop.
Save boobo94/7423ed90af8d73d49a0915ef486b380b to your computer and use it in GitHub Desktop.
VSCode Task to remove dead branches from localhost or remote
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Git Prune",
"type": "shell",
"command": "git fetch --prune && git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d",
"problemMatcher": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment