DEV Community

David Garcia
David Garcia

Posted on

๐Ÿงน Remove them with a single Fish Shell command:

1๏ธโƒฃ Save the following script in:
๐Ÿ“‚ย .config/fish/functions/git-delete-branches.fish

2๏ธโƒฃ Execute the command:

git-delete-branches "<regex>"

๐Ÿ”น Finds and deletes local/remote branches matching a regex.
๐Ÿ”น Asks for confirmation to avoid surprises.
๐Ÿ”น Saves time and keeps your repo clean.

๐Ÿ“Œ Full code and explanation ๐Ÿ‘‰

Top comments (0)