Finding next matching hunk when using git add --patch
문제
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?
해결책
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.
다른 팁
You could try using rlwrap (which is readline for any command), e.g. like this:
rlwrap git add --patch
제휴하지 않습니다 StackOverflow