this post was submitted on 07 Aug 2025
85 points (98.9% liked)
Programming
22083 readers
189 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
In case you're interested,
git add <files> -p
allows you to do this on the command line. I use it daily.Yeah, I use it when ssh'd into a server, but it's just so awkward to use.
Sometimes it just really doesn't want to separate a hunk. Other times you want to stage all lines except one, and you have to do a million splits just to target the lines you want to keep.
It'd be far easier if you could just select the lines you want to affect. It's literally the first feature shown in lazygit's readme. I think half the reason that people use lazygit is that partial commits are so awkward to perform in most other clients.
Luckily Fork does it as well as lazygit
I still don't think it's nearly as convenient as being able to just see the changes side by side and click the one you want (or both). You can even easily modify the final outcome in the 3rd preview panel, in case you need to do a quick fix after a conflict resolution.