bigH / git-fuzzy

interactive `git` with the help of `fzf`
MIT License
2.3k stars 42 forks source link

Amend in status #51

Closed iloveitaly closed 11 months ago

iloveitaly commented 1 year ago

Would be great in fuzzy status to have a short cut to git amend (I like commit --amend --reuse-message=HEAD) the current selection.

iloveitaly commented 12 months ago

@bigH I'm happy to add this in if it's something you are cool with

bigH commented 12 months ago

@iloveitaly I like this suggestion. I definitely have some use for it. Here's how I'd implement it, though I'm open to different approaches:

  1. User selects some file/files
  2. User presses key combination for "amend"
  3. User selects the commit they squash into (git fuzzy log should do just fine), default selection is naturally HEAD since it'll be the first item in a git log
  4. User presses and (success) returns to the status screen, (fail) returns to the log screen.
iloveitaly commented 12 months ago

I was thinking we could keep it simple and use something like:

commit --amend --reuse-message=HEAD

and then return right back to the selection screen.

i.e. the use case is you want to amend the staged files to the previous comment.

wdyt?

bigH commented 12 months ago

Go ahead with your proposed design!

On Thu, Jul 13, 2023 at 8:59 AM Michael Bianco @.***> wrote:

I was thinking we could keep it simple and use something like:

commit --amend --reuse-message=HEAD

and then return right back to the selection screen.

i.e. the use case is you want to amend the staged files to the previous comment.

wdyt?

— Reply to this email directly, view it on GitHub https://github.com/bigH/git-fuzzy/issues/51#issuecomment-1634503208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASCAK3ZMW2TPHA5HCIC52LXQALODANCNFSM6AAAAAA2B2N6JA . You are receiving this because you were mentioned.Message ID: @.***>

iloveitaly commented 11 months ago

This is done!