I used patch mode to add a file. It took a good while to add only the changes I wanted in this commit. But then I realized I had made a mistake. There was one block of code I don't want in this commit.
Is there a way I can edit the staged change set without changing my working directory and not repeating the long process of git add -up somefile
?
Yes, just use git reset -p
to selectively unstage patches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With