From 9eb3f1ea4fe9c5bb9c431c98df4a13920d2b3e63 Mon Sep 17 00:00:00 2001 From: CREATIVE_tg1 Date: Fri, 24 Oct 2025 08:09:10 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20Makefile.other?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile.other | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Makefile.other diff --git a/Makefile.other b/Makefile.other new file mode 100644 index 0000000..ff04c99 --- /dev/null +++ b/Makefile.other @@ -0,0 +1,13 @@ +.PHONY: clean-branches + +clean-branches: + @echo "Fetching updates from origin..." + git fetch --prune + @echo "Checking for local branches missing on origin..." +ifeq ($(OS),Windows_NT) + @for /f "tokens=1,2*" %%i in ('git branch -vv ^| findstr /C:": gone]"') do git branch -d -D %%i + @for /f "tokens=1,2*" %%i in ('git branch -vv ^| findstr /C:"[удалённый путь] отсутствует"') do git branch -d -D %%i +else + @git branch -vv | grep -E ': gone\]|отсутствует' | awk '{print $$1}' | xargs -r git branch -d -D +endif + @echo "Done!" \ No newline at end of file