ध्यान दें कि धक्का देने के लिए परिवर्तनों की संख्या शायद मूल/मास्टर से आगे की जाने वाली कमियों की संख्या को संदर्भित करती है और शिकारी से असंबंधित है। करता आप गुरु से आगे हैं देखने के लिए, आप कर सकते हैं निम्नलिखित:
# get most recent commit found in both master and origin/master
mb=$(git merge-base master origin/master)
# show commits from that merge base to current head
git log $mb..HEAD
आप इसे की गणना करना चाहते हैं, तो बस कार्य करें:
mb=...
git log --pretty=oneline $mb..HEAD | wc -l
hunk
diff
से संबंधित एक शब्द है :
प्रारूप प्रारूप प्रारूप के समान ही दो-पंक्ति शीर्षलेख के साथ शुरू होता है, सिवाय इसके कि मूल फ़ाइल पहले से है डी "---" द्वारा और नई फ़ाइल "+++" से पहले है। इसके बाद एक या अधिक परिवर्तन शिकारी है जिसमें फ़ाइल में रेखा अंतर शामिल हैं। अपरिवर्तित, प्रासंगिक रेखाएं एक स्पेस कैरेक्टर से पहले होती हैं, अतिरिक्त लाइनें प्लस साइन से पहले होती हैं, और डिलीशन लाइनों को शून्य चिह्न से पहले किया जाता है।
--- /path/to/original ''timestamp''
+++ /path/to/new ''timestamp''
@@ -1,3 +1,9 @@
+This is an important
+notice! It should
+therefore be located at
+the beginning of this
+document!
+
This part of the
document has stayed the
same from version to
@@ -5,16 +11,10 @@
be shown if it doesn't
change. Otherwise, that
would not be helping to
-compress the size of the
-changes.
-
-This paragraph contains
-text that is outdated.
-It will be deleted in the
-near future.
+compress anything.
It is important to spell
-check this dokument. On
+check this document. On
the other hand, a
misspelled word isn't
the end of the world.
@@ -22,3 +22,7 @@
this paragraph needs to
be changed. Things can
be added after it.
+
+This paragraph contains
+important new additions
+to this document.
फ़ाइल ऊपर तीन जिसे हैं:
क्या तुमने कभी दो फ़ाइलों की एक diff ले लिया है, तो आप इस तरह फ़ाइल (विकिपीडिया से फिर से) देखें। यदि आप किसी प्रतिबद्धता से जुड़े अंतर को देखना चाहते हैं, तो आप git show [<commit>]
का उपयोग कर सकते हैं। अपने वर्तमान अस्थिर परिवर्तनों और भंडार के बीच अंतर देखने के लिए, आप git diff
का उपयोग कर सकते हैं। कई अन्य विकल्प हैं।
शिकारी की संख्या गिनने के लिए (जो वास्तव में वास्तव में बेकार है, लेकिन यदि आप जोर देते हैं), तो आप एक बहुत ही सरल लिपि का उपयोग कर सकते हैं।
git show | grep '^@@.*@@.*$' | wc -l
.*
दूसरा @@
के बाद के लिए कारण यह है कि Git का अंतर भी समारोह परिवर्तन तो यह बेहतर बाद में diff लागू कर सकते हैं के अंतर्गत आता है पता चलता है, तो उदाहरण के लिए हंक शीर्षक ऐसा दिखाई दे सकता:
@@ -85,6 +85,6 @@ void urt_shmem_detach(void *mem)
'sourcetree' द्वारा आप एटलसियन सॉर्सेट्री का संदर्भ लेते हैं? क्योंकि इसका एक अलग टैग है। वास्तव में, वर्तमान 'स्रोत-पेड़' में अधिक प्रासंगिकता नहीं है। – Shahbaz