🧹 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.


This content originally appeared on DEV Community and was authored by David Garcia

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 👉


This content originally appeared on DEV Community and was authored by David Garcia


Print Share Comment Cite Upload Translate Updates
APA

David Garcia | Sciencx (2025-02-19T06:09:39+00:00) 🧹 Remove them with a single Fish Shell command:. Retrieved from https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/

MLA
" » 🧹 Remove them with a single Fish Shell command:." David Garcia | Sciencx - Wednesday February 19, 2025, https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/
HARVARD
David Garcia | Sciencx Wednesday February 19, 2025 » 🧹 Remove them with a single Fish Shell command:., viewed ,<https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/>
VANCOUVER
David Garcia | Sciencx - » 🧹 Remove them with a single Fish Shell command:. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/
CHICAGO
" » 🧹 Remove them with a single Fish Shell command:." David Garcia | Sciencx - Accessed . https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/
IEEE
" » 🧹 Remove them with a single Fish Shell command:." David Garcia | Sciencx [Online]. Available: https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/. [Accessed: ]
rf:citation
» 🧹 Remove them with a single Fish Shell command: | David Garcia | Sciencx | https://www.scien.cx/2025/02/19/%f0%9f%a7%b9-remove-them-with-a-single-fish-shell-command/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.