Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more git smart features #6

Open
cszczepaniak opened this issue Jan 16, 2022 · 1 comment
Open

Add more git smart features #6

cszczepaniak opened this issue Jan 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@cszczepaniak
Copy link

This is a nice tool. I wonder what you'd think about extending it to include more git features? The top one I can think of right now would be git-smart-delete:

  • Populate the same initial list of branches as git-smart-checkout
  • Instead of a fuzzy matcher, I think you'd want something like prefix matching to be able to delete multiple branches at once, or the option to choose different matchers
  • Confirm which branches are being deleted; maybe warn for ones that aren't merged yet or don't delete those by default

I know you can just do `git branch --merged | grep -Ev "^*|main|master" | xargs git branch -d", but the more helpful UI of smart-checkout would make me feel better about cleaning up my branches, so I think this could be a good addition.

@cszczepaniak cszczepaniak changed the title Add more useful git smart features Add more git smart features Jan 16, 2022
@craciuncezar
Copy link
Owner

Sounds good to me 👍 I'll add it to the backlog of ideas.

One way of implementing this would be to combine the search functionality with a multi select prompt. You would select needed branches by pressing a key (or maybe 2 keys simultaneously to avoid clashes with the search typing) and then press Enter to batch delete them all. The multi select would look something like this:

Screen.Recording.2022-01-17.at.10.50.20.mov

For those with a lot branches a solution would be to add a shortcut to select all branches matched against the search result

@craciuncezar craciuncezar added the enhancement New feature or request label Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants