Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
🔧 Delete branches that have been squash merged during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieconnolly committed Sep 12, 2018
1 parent 699b645 commit 55ff30b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libexec/handles-sync
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ TARGET_DIR="${1-${PROJECT_HOME}}"
shopt -s nullglob
for path in "$TARGET_DIR"/**/*/.git; do
path="${path%/*}"
echo "==> Syncing ${path#${PROJECT_HOME}/}"
cd "$path"
hub sync || true

echo "==> Syncing ${path#${PROJECT_HOME}/}"
hub sync 2>/dev/null || true
git branch -vv | grep '.*/.*: gone]' | awk '{print $1}' | xargs git branch -D || true
done
shopt -u nullglob

0 comments on commit 55ff30b

Please sign in to comment.