git shortlog

git

इस्तेमाल

git shortlog -sne [<revision-range>]

commit को लेखक के हिसाब से समूह बनाकर गिनता है, release notes के लिए उपयोगी; एक ही व्यक्ति के दो ईमेल हों तो .mailmap के बिना वह दो बार गिना जाता है।

आम विकल्प

विकल्पअर्थ
-scounts only, no subjects
-nsort by number of commits
-eshow the email address as well
-cgroup by committer instead of author
--no-mergesleave merge commits out of the count
--since=<date>only commits after a date

उदाहरण

git shortlog -sne

every contributor with a commit count

git shortlog -sn v1.1.0..v1.2.0

who did what between two releases

git shortlog --no-merges -sn --since="1 year ago"

this year, merges excluded

उलझन यह है कि पीछे लौटने के कई रूप हैं — ब्रांच का इशारा हटाना और उलटने वाला कमिट जोड़ना एक बात नहीं।

कैसे पढ़ें

  • बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
  • तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
  • विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।

आम सवाल

Q. git shortlog क्या करता है?

commit को लेखक के हिसाब से समूह बनाकर गिनता है, release notes के लिए उपयोगी; एक ही व्यक्ति के दो ईमेल हों तो .mailmap के बिना वह दो बार गिना जाता है।

Q. इसे कैसे लिखें?

git shortlog -sne [<revision-range>] — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

Q. कितने विकल्प जानने लायक़ हैं?

यहाँ 6 दिए हैं; पूरी सूची man git में है। यह कमांड git में आती है।

मिलती-जुलती कमांड

man पेज: man git-shortlog