Добавить Makefile.other
This commit is contained in:
13
Makefile.other
Normal file
13
Makefile.other
Normal file
@@ -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!"
|
||||
Reference in New Issue
Block a user