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

170 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 answers

1
manojlds 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.