This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-22
Channels
- # announcements (1)
- # babashka (28)
- # beginners (120)
- # braveandtrue (6)
- # calva (59)
- # cider (10)
- # clj-kondo (10)
- # cljfx (2)
- # clojure (66)
- # clojure-europe (20)
- # clojure-germany (1)
- # clojure-italy (3)
- # clojure-nl (4)
- # clojure-norway (1)
- # clojure-serbia (17)
- # clojure-spain (1)
- # clojure-uk (17)
- # clojurescript (120)
- # clojureverse-ops (4)
- # core-async (5)
- # cursive (18)
- # data-oriented-programming (1)
- # datomic (4)
- # deps-new (8)
- # emacs (14)
- # fulcro (16)
- # funcool (2)
- # kaocha (4)
- # lambdaisland (5)
- # luminus (1)
- # malli (47)
- # membrane (9)
- # mid-cities-meetup (2)
- # music (1)
- # off-topic (44)
- # pathom (13)
- # practicalli (2)
- # re-frame (15)
- # reagent (34)
- # reveal (25)
- # ring (56)
- # rum (1)
- # shadow-cljs (23)
- # sql (14)
- # startup-in-a-month (1)
- # tools-deps (10)
- # vim (9)
- # vscode (3)
- # xtdb (9)
Hey!
Do you have a nice workflow for cleaning up local branches? Care to share?
I'd love something like dired's ddddddxy
, but from what I can see, Magit doesn't provide a buffer-of-branches that works like this.
I don't do that very often; that's why I never bothered about automating this.
Basically, I would turn off the read-only mode, copy the names of the branches, paste in a scratch buffer, join the lines, then go back to Magit buffer and press ! !
then run git -D branch-1 branch-2 ... branch-n
Is this similar to what you want? https://emacs.stackexchange.com/a/19013
@UJRDALZA5 yup, that would solve my problem! Though I'm using Ivy, and would prefer not dragging in Helm for a Magit mode.
I just tried it. Works without Helm. Not sure why Helm is mentioned. For me, the delete key was x and not k as mentioned.
There's also https://emacsredux.com/blog/2021/03/23/deleting-git-branches-with-magit/
Great timing, @U051BLM8F! 😄
The DOOM Emacs configuration for Magit seems to be using y
for yanking stuff, not opening a branch list.
The branch "dispatch ground" doesn't seem to list a way for me to do this either. Guess I should learn how to open packages with unconfigured key bindings.
For DOOM users:
M-x magit-dispatch y C-v jjj x
This does:
1. Bring up the "other" dispatch menu, that you perhaps didn't know you have (I didn't)
2. y to list refs
3. start visual mode and select
4. Press x to delete selected.This is what is suggested in the StackExchange thread also. The answer is by none other than https://github.com/tarsius. You are right about y
being bound to yank. But I can just type ?
in the Magit buffer which is bound to magit-dispatch
(in Doom).