Closed guiccbr closed 2 years ago
Yeah, that is a good point. If you feel like adding a flag for that (perhaps -r
?), I'd be happy to merge that in! 🙏
Tks, @nvie , there is already a flag-l
, that has the opposite behavior. Do you think that it's ok to rename it to -r and make the adjustments? If so I can send a pr.
I wouldn't mind making them both explicit, so that just invoking git cleanup
without flags would not do anything and show the usage, and it would ask you to specify -l
, -r
, or both.
+1 on this very much! I just deleted a ton of remote branches by making this assumption/mistake, though I recognize it's on me to keep this sort of thing in mind.
I see no PR referenced in this issue, shall I take this on?
Another thought though - how hard might it be to make a variant/default that only deletes your branches remotely, instead of any?
Thanks for the ping, @riotrah! I just implemented the behavior I suggested earlier, which I've released as v1.8.0 just now.
I was surprised that after running cleanup (without reading the docs carefully), all of the merged branches were also removed in the remote. Even branches that were not created by me.
It seems to me that the default should be local-only to make sure that we don't mess up with branches that other devs may be relying on.