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)