From 61deac66bf68171235e80964b41e08d00565e851 Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Mon, 10 Jan 2022 14:24:41 +0100 Subject: [PATCH] chore: tell the user how to clean her git local branches. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 650c737a8..5ea4b1515 100644 --- a/Makefile +++ b/Makefile @@ -357,3 +357,12 @@ help: .PHONY: pip_audit # Run pip-audit and check if there are known vulnerabilities in our dependencies pip_audit: poetry run pip-audit + +.PHONY: clean_local_git # Tell the user how to delete local git branches, except main +clean_local_git: + @git fetch --all --prune + @echo "Consider doing: " + @echo + @# Don't consider deleting `main` or current branches + @git branch | grep -v "^*" | grep -v main | xargs echo "git branch -D " + @echo