13 lines
196 B
Bash
Executable File
13 lines
196 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
git fetch -p
|
|
git checkout main
|
|
git pull
|
|
|
|
git branch --merged main | grep -v main | while read BRANCH; do
|
|
git branch -d $BRANCH
|
|
done
|
|
|
|
echo "Branches remaining:"
|
|
git branch
|