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?
Share
git addis 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.