विज्ञापन

क्रिप्टो एक्सचेंज बोनस पाएँ

सिर्फ़ साइन अप करने पर मिलने वाले बोनस। शर्तें हर एक्सचेंज की घोषणा से ज्यों की त्यों ली गई हैं।

git remote

git

इस्तेमाल

git remote -v | git remote add <name> <url>

रिमोट repository के नाम और URL सँभालता है; यह उन्हें केवल दर्ज करता है, fetch या push करने तक कुछ आता-जाता नहीं।

आम विकल्प

विकल्पअर्थ
-vlist the remotes with their URLs
add <name> <url>register another repository
set-url <name> <url>point an existing remote somewhere else
rename <old> <new>rename a remote
remove <name>forget a remote
show <name>branches it has and how they are tracked
prune <name>drop tracking refs for branches deleted there

उदाहरण

git remote -v

shows the fetch and push URL of every remote

git remote add upstream https://github.com/orig/repo.git

adds the original repo alongside your fork

git remote set-url origin git@github.com:me/repo.git

switches origin from HTTPS to ssh

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

कैसे पढ़ें

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

आम सवाल

Qgit remote क्या करता है?

रिमोट repository के नाम और URL सँभालता है; यह उन्हें केवल दर्ज करता है, fetch या push करने तक कुछ आता-जाता नहीं।

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

git remote -v | git remote add <name> <url> — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

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

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

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

man पेज: man git-remote