-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Suggestion: add ability to split hunks into smaller hunks #749
Comments
currently if you hit enter on a file you'll enter line-by-line staging mode where you can stage the file on a per-line basis. In that context, |
Here's an example. Say I have these unstaged changes: I only want to stage the first set of changes. Unfortunately Git considers all of the changes as a single hunk, because these changes live so close together. That's where I could use the line-by-line approach, but that would be annoying if there were many lines in the change. The change could be hundreds of lines long 🤔 |
I'm also in favor of this, as it makes feasible mass editing a bunch of changes in a single pass, then going back and committing them separately. Line by line is not convenient there. |
@jesseduffield thoughts on this? |
I'm in favour of it, but last time I checked it wasn't straightforward to do. Happy to give pointers if somebody wants to tackle it |
Beginner; unfortunately when I press |
Is your feature request related to a problem? Please describe.
I like the ability to select hunks, but sometimes the hunks are too big and need to be broken down into smaller hunks.
git add --patch
provides an option for this—thes
shortcut. It would be great if lazygit could provide something similar.Describe the solution you'd like
When a hunk is selected, pressing
s
should split it into smaller hunks, like how it works ingit add --patch
.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: