git tag
git
इस्तेमाल
git tag [-a] <name> [<commit>]किसी commit पर version जैसा नाम लगा देता है; सादा git push tag नहीं भेजता, tag को नाम से अलग push करना पड़ता है।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| -a | annotated tag with a message, author and date |
| -m "<msg>" | the message for -a |
| -l "<pattern>" | list tags matching a pattern |
| -d <name> | delete a tag locally |
| -f | move an existing tag |
| --sort=-creatordate | newest tag first |
उदाहरण
git tag -a v1.2.0 -m "release 1.2.0"marks the current commit as a release
git push origin v1.2.0the separate step that puts the tag on the server
git tag -d v1.2.0deletes it locally; the server keeps its copy
उलझन यह है कि पीछे लौटने के कई रूप हैं — ब्रांच का इशारा हटाना और उलटने वाला कमिट जोड़ना एक बात नहीं।
कैसे पढ़ें
- बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
- तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
- विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।
आम सवाल
Q. git tag क्या करता है?
किसी commit पर version जैसा नाम लगा देता है; सादा git push tag नहीं भेजता, tag को नाम से अलग push करना पड़ता है।
Q. इसे कैसे लिखें?
git tag [-a] <name> [<commit>] — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।
Q. कितने विकल्प जानने लायक़ हैं?
यहाँ 6 दिए हैं; पूरी सूची man git में है। यह कमांड git में आती है।
मिलती-जुलती कमांड
man पेज: man git-tag