Git: How to "restage" the same lines which were staged?

214 Views Asked by At

I have staged some of the modified lines with git add --patch.

I have later modified those lines.

How could I stage the same lines without selecting them again with git add --patch?

1

There are 1 best solutions below

1
On BEST ANSWER

This is not possible, and I don't think there is a straightforward way to script this that will be worth it. Suggest going through the git add -p process again.