2012-11-10 11 views
6

Próbuję dodać część commit używającgit dodać regex przykład

git add -p 

wybrałem opcję regex

/ - search for a hunk matching the given regex 

Łatka zawiera te linie

+  AMFObject obj2; 
+  AMFObjectProperty p; 
+  AVal redirect; 

Ale git nie wydaje się, aby go znaleźć

search for regex? redirect 
No hunk matches the given pattern 

Odpowiedz

8

Problem polegał na tym, że łatka dotyczyła więcej niż jednego pliku.

Musiałem wybrał

d - do not stage this hunk nor any of the later hunks in the file 

aż osiągnie odpowiedni plik, a następnie regex będzie działać.

Powiązane problemy