গিট-পি এর প্রসঙ্গে প্রতিটি [y, n, q, a, d, /, K, j, J, g, e ,?] কী দাঁড়ায়?


272

-P মোড ব্যবহার করার সময় git add -pবা git stash -pপ্রতিটি বর্ণগুলি কীসের জন্য দাঁড়ায়?

আমি অনুমান করছি yহ্যাঁ এবং nনা হয়। বাকী কী আছে?

[Y, এন, কুই, একটি, ডি, /, কে, জে, জে, ছ, ই ,?]


64
আপনি যদি ?বিকল্পটি চেষ্টা করে দেখুন , আপনি খুঁজে পাবেন
অ্যাবে ভোলেকার

7
হয়তো আপনাকে কিছুটা উপরে যেতে হবে?
কসিমো

1
গৃহীত উত্তরের মুদ্রণপত্রে 'প্রবেশের সময় তালিকাভুক্ত বিকল্পগুলি অন্তর্ভুক্ত রয়েছে?'
চিহ্নিত করুন

উত্তর:


325

-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

8
@ ভিকগোল্ডফিল্ড ডি পরবর্তী ফাইলটিতে এগিয়ে যাবেন যখন পুরো প্রক্রিয়াটি পুরোপুরি বাতিল করতে হবে?
স্টিভ

5
qপূর্ববর্তী পর্যায়ের পরিবর্তনগুলি পুনরায় সেট করে না । আপনি ইতিমধ্যে মঞ্চস্থ করেছেন যা মঞ্চস্থ থাকে।
আলেকজান্ডার বার্ড

আমি -pস্ট্যাশিংয়ের জন্য ব্যবহার করি , আপনি জানেন না যে আপনি এটির addজন্যও এটি ব্যবহার করতে পারেন ! কেবলমাত্র এই উত্তরে যুক্ত করার জন্য, -p | --patchপতাকাটির উল্লেখ থাকলেও এই সেন্টিমিডি: git stash --helpআপনাকে প্যাচ বিকল্পগুলির মতো একই তথ্য git add --helpদেয় না।
ফিল গিবিনস

31

টাইপ করে এই অক্ষরের অর্থ খুঁজে পাওয়া যাবে ? এবং এন্টার কী টিপুন। আমার জন্য এগুলি রান করার সময় আসেনি 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,?]? 
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.