Я могу изменить размер ломтя мерзавца-add's?

У меня была идея, подобная Mladen, но противоположному...

String s = "a.b.c.d";
int charCount = s.replaceAll("[^.]", "").length();
println(charCount);
27
задан pr1001 13 July 2009 в 21:34
поделиться

2 ответа

В дополнение к «y» и «n», один из ответов, которые вы можете дать, когда вас спросят о ломе, - это «s», что означает «разделить этот кусок на более мелкие части». Полный список:

y - stage this hunk
n - do not stage this hunk
q - quit, do not stage this hunk nor any of the remaining ones
a - stage this and all the remaining hunks in the file
d - do not stage this hunk nor any of the remaining hunks in the file
g - select a hunk to go to
/ - search for a hunk matching the given regex
j - leave this hunk undecided, see next undecided hunk
J - leave this hunk undecided, see next hunk
k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks
e - manually edit the current hunk
? - print help
46
ответ дан 28 November 2019 в 04:54
поделиться

git gui позволит вам фиксировать отдельные строки, даже если они окружены другими измененными строками, которые вы не хотите фиксировать.

11
ответ дан 28 November 2019 в 04:54
поделиться
Другие вопросы по тегам:

Похожие вопросы: