git am
git
इस्तेमाल
git am [-3] <mbox|patch>...ईमेल से आए patch को मूल लेखक और संदेश के साथ commit बना देता है; बीच में विफल हो तो वहीं रुक जाता है, इसलिए --continue, --skip या --abort से पूरा करना पड़ता है।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| -3 | three-way merge when the patch does not apply cleanly |
| -s | add a Signed-off-by line |
| --continue | go on after you fixed the conflict |
| --skip | drop this patch and continue the series |
| --abort | undo the whole series |
| -k | keep the subject line exactly as it is |
उदाहरण
git am 0001-fix-login.patchcommits the patch, keeping its original author
git am -3 *.patchapplies a whole series, merging where needed
git am --abortreturns 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