You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, so it looks like Git does not support directly resetting a particular hunk. I have a proposed workaround for this, but it could be risky if it doesn't work as I expect under some edge cases.
Option 1
Under the hood, when you go to reset a hunk, gex can:
Stage everything other than the selected hunk
Commit
Reset hard to HEAD
Reset --soft to the previous commit
While typing this out I just though already of a super common case where this won't work: the case where you already have some hunks/files staged. Ugh. Leaving here just in case I think of a way to include that case
Option 2
We find some way to do this using libgit since we are already depending on it anyway.
Would be cool to be able to press d to discard changes to a hunk or file. I really think this should have a confirmation though, at least by default.
The text was updated successfully, but these errors were encountered: