-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD branches cleanup script #1885
ADD branches cleanup script #1885
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1885 +/- ##
=======================================
Coverage 21.32% 21.32%
=======================================
Files 257 257
Lines 5740 5740
Branches 691 702 +11
=======================================
Hits 1224 1224
+ Misses 4013 3979 -34
- Partials 503 537 +34
Continue to review full report at Codecov.
|
tried to test it. always get |
Great script, Norbert! I noticed that it missed the branch |
It doesn't work if the origin is named other than
|
scripts/clean-merged-branches.sh
Outdated
branches=$( | ||
git branch -a --merged origin/master | | ||
grep remotes/origin/ | | ||
grep -v /master | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This excludes remotes/origin/Gongreg/master
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix that and add a confirm prompt instead of "run this command with -f
" message
I changed "Run with '-f' if you're sure" to "Press 'y' if you're sure" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue: -we sometimes leave merged branches around-
What I did
I added a script to remove them
How to test
Run script:
Will list the branches
Run script:
Will remove listed branches from remote