Stopping an accidental push
1 min read
After starting to make use of the GitLab/Codeberg sync approach for various repositories, I found that my muscle memory in Magit was getting the better of me and, on occasion, I'd push a new branch to backups when I wanted origin. I sensed there had to be a way round that.
Here's what I settled on:
(advice-add
'magit-list-remotes
:filter-return (lambda (remotes) (delete "backups" remotes)))
Now I never see backups in Magit and now I can keep using my muscle memory (rather than actually reading what is in front of me, it seems).
Have a comment or query about this post? Feel free to drop me a line about it.