programing

각 [y,n,q,a,d,/,K,j,J,g,e,?]는 git-p의 맥락에서 무엇을 나타냅니까?

i4 2023. 5. 11. 21:06
반응형

각 [y,n,q,a,d,/,K,j,J,g,e,?]는 git-p의 맥락에서 무엇을 나타냅니까?

의 -p 모드를 사용하는 경우git add -p또는git stash -p각각의 글자들은 무엇을 나타냅니까?

제 생각엔y예 및n아니요. 나머지는 뭐죠?

[y,n,q,a,d,/,K,j,J,g,e,?]

-p모드는 패치를 의미하며, 도움말을 찾기가 어렵지만 확인하면git add --help당신은 다음을 찾을 수 있을 것입니다.

   patch
       This lets you choose one path out of a status like selection. After choosing the path, it presents the diff between the index and the working tree file and asks you if you want to stage the change of each hunk. You can select one of the following options and type return:

           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 hunk and all later hunks in the file
           d - do not stage this hunk nor any of the later 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

이러한 문자의 의미는 ?를 입력하고 Enter 키를 누르면 알 수 있습니다.나에게 이것들은 실행할 때 오지 않았습니다.git add --help아래와 같이 이 옵션들의 의미를 알았습니다 :-

Arup-iMac:$ git add -p
diff --git a/app/interactors/reporting_groups/list_colleagues.rb b/app/interactors/reporting_groups/list_colleagues.rb
index adc28af..f46f5e3 100644
--- a/app/interactors/reporting_groups/list_colleagues.rb
+++ b/app/interactors/reporting_groups/list_colleagues.rb
@@ -14,7 +14,4 @@ module ReportingGroups
         reporting_group.employees_from_team_sub_reporting_groups
       else
         reporting_group.users
-      end
-    end
-  end
-end
+      
Stage this hunk [y,n,q,a,d,/,e,?]? ? <-- Look here, what I typed to get these.
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 hunk and all later hunks in the file
d - do not stage this hunk nor any of the later 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
@@ -14,7 +14,4 @@ module ReportingGroups
         reporting_group.employees_from_team_sub_reporting_groups
       else
         reporting_group.users
-      end
-    end
-  end
-end
+      
Stage this hunk [y,n,q,a,d,/,e,?]? 

언급URL : https://stackoverflow.com/questions/10605405/what-does-each-of-the-y-n-q-a-d-k-j-j-g-e-stand-for-in-context-of-git-p

반응형