Skip to content

Instantly share code, notes, and snippets.

@evan-moon
Created July 27, 2019 02:21
Show Gist options
  • Save evan-moon/18ddaf44330e811925284c0ceab0b746 to your computer and use it in GitHub Desktop.
Save evan-moon/18ddaf44330e811925284c0ceab0b746 to your computer and use it in GitHub Desktop.
리모트 저장소에서 지워진 브랜치를 로컬에서 삭제
#!/bin/bash
echo '====================================================================='
echo '========Please insert the directory name that you want to go========='
echo '====================================================================='
read -p '[Git Directory Path] : ' prompt
cd ~/$prompt
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment