Search code examples
gitgit-addinteractive-modegit-stage

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


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?


Solution

  • 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.