git am

git

इस्तेमाल

git am [-3] <mbox|patch>...

ईमेल से आए patch को मूल लेखक और संदेश के साथ commit बना देता है; बीच में विफल हो तो वहीं रुक जाता है, इसलिए --continue, --skip या --abort से पूरा करना पड़ता है।

आम विकल्प

विकल्पअर्थ
-3three-way merge when the patch does not apply cleanly
-sadd a Signed-off-by line
--continuego on after you fixed the conflict
--skipdrop this patch and continue the series
--abortundo the whole series
-kkeep the subject line exactly as it is

उदाहरण

git am 0001-fix-login.patch

commits the patch, keeping its original author

git am -3 *.patch

applies a whole series, merging where needed

git am --abort

returns to before the series started

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

कैसे पढ़ें

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

आम सवाल

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

ईमेल से आए patch को मूल लेखक और संदेश के साथ commit बना देता है; बीच में विफल हो तो वहीं रुक जाता है, इसलिए --continue, --skip या --abort से पूरा करना पड़ता है।

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

git am [-3] <mbox|patch>... — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

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

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

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

man पेज: man git-am