Frage

I find the use of git add --patch very useful for my work-flow sometimes, like when I need to revise lots before anything is ready to commit, especially with documentation. If I have a large number of hunks to sift through, the search feature via / is helpful, but I have not discovered any way to search for the next hunk matching my regex without retyping the regex each time. Is there a way to do that?

War es hilfreich?

Lösung

git add is not a bash shell so you can't just recall history. Just copy the regex to your clipboard before executing it. You can then paste it in next time.

Andere Tipps

You could try using rlwrap (which is readline for any command), e.g. like this:

rlwrap git add --patch
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top