質問

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top