dev-resources.site
for different kinds of informations.
Clean your git branches local and remote
Published at
11/18/2020
Categories
git
bash
Author
Luigui Moreno
Often after a few months of work I find myself with way too many git branches in my local repos, looking for in the internet how to delete local and remote branches in git, well, I have created a bash function for that, and now I'm goint to share it:
Add this to your bash profile
gitrm () { git branch -d $1 && git push origin :$1 }
gitrmf () { git branch -D $1 && git push origin :$1 }
Usage:
gitrm fix/fix-this-breaks-that
To force delete local not merged branches
gitrmf feature/we-dont-even-need-his-feature-anymore
Articles
9 articles in total
Laravel upgrade 10 to 11 Modifying Columns change
read article
Macbook air m1 vs macbook pro 15 2018 vs mac mini 2018
read article
Scroll to the end of x bookmarks
read article
Phpstorm Intellij search mode when focusing
read article
Laravel Websockets in valet cURL error 60: SSL certificate problem: unable to get local issuer certificate
read article
Migrate Laravel factories to class factories
read article
Clean your git branches local and remote
currently reading
Laravel model factories with relation sharing foreign keys
read article
Post de bienvenida
read article
Featured ones: