Harry Dobrev
Harry Dobrev

Reputation: 7706

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?

Upvotes: 2

Views: 170

Answers (1)

manojlds
manojlds

Reputation: 301167

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.

Upvotes: 1

Related Questions