thinking of writing a git zine bonus page about how to use `git add -p`
-
thinking of writing a git zine bonus page about how to use `git add -p`
but I realized that I don’t have a great way to solve my main problem with `git add -p`, which is that sometimes I have 2 adjacent lines and I want to stage one of them but not the other one
the solutions I know are
a) say ‘n', edit the file to undo one of the changes, and then run `git add -p` again
b) say ‘e’ and edit the patch manually (which I'm a little afraid of honestly)(also I would welcome other tips!)
-
@b0rk I usually do the first thing. I don't like editing patches either. But in simple cases it's not too bad. You can always check `git diff --cached` to make sure the edits did what you wanted.
Copyright © 2024 NodeBB | Contributors