रिमोट पर पुश करना

इंटरमीडिएट Git

George Boorman

Curriculum Manager, DataCamp

रिमोट से pull करना

रिमोट रिपोजिटरी से pull करें

इंटरमीडिएट Git

रिमोट पर push करना

रिमोट पर push करें

इंटरमीडिएट Git

git push

  • पहले बदलाव लोकली सेव करें!
git push remote local_branch
  • local_branch से remote में push करें

  • लोकल repo की main ब्रांच से origin में बदलाव push करें

git push origin main
इंटरमीडिएट Git

Push/pull वर्कफ़्लो

रिमोट से pull कर लोकल repo में लाएँ

इंटरमीडिएट Git

Push/pull वर्कफ़्लो

प्रोजेक्ट पर लोकली काम करें

इंटरमीडिएट Git

Push/pull वर्कफ़्लो

अपडेटेड लोकल रिपोजिटरी को रिमोट पर push करें

इंटरमीडिएट Git

पहले push करना

  • Pull करने से पहले main को रिमोट पर push करना
git push origin main
इंटरमीडिएट Git

रिमोट/लोकल कॉन्फ्लिक्ट्स

git push origin main रिजेक्शन आउटपुट

इंटरमीडिएट Git

रिमोट/लोकल कॉन्फ्लिक्ट्स

git push origin main रिजेक्शन आउटपुट में रिमोट URL हाइलाइटेड

इंटरमीडिएट Git

รिमोट/लोकल कॉन्फ्लिक्ट्स

git push origin main रिजेक्शन आउटपुट में परिणाम हाइलाइटेड

इंटरमीडिएट Git

रिमोट/लोकल कॉन्फ्लिक्ट्स

git push origin main रिजेक्शन आउटपुट में कारण और सुझाव हाइलाइटेड

इंटरमीडिएट Git

कॉन्फ्लिक्ट से बचना

  • पहले रिमोट से pull करें
git pull origin main

git_pull_nano_editor.gif

इंटरमीडिएट Git

बिना एडिट किए pull करना

git pull --no-edit origin main
  • सलाह नहीं दी जाती, जब तक आप अपने प्रोजेक्ट के इतिहास पर बहुत आश्वस्त न हों!
इंटरमीडिएट Git

नई लोकल ब्रांच push करना

  • लोकली hotfix ब्रांच में काम कर रहे हैं

  • hotfix रिमोट में मौजूद नहीं है

इंटरमीडिएट Git

नई रिमोट ब्रांच बनाना

  • hotfix सिर्फ लोकली मौजूद है
git push origin hotfix
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 349 bytes | 349.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: 
remote: Create a pull request for 'hotfix' on GitHub by visiting:
remote:      https://github.com/datacamp/project/pull/new/hotfix
remote: 
To https://github.com/datacamp/project
 * [new branch]      hotfix -> hotfix
branch 'hotfix' set up to track 'origin/hotfix'.
इंटरमीडिएट Git

अभ्यास करते हैं!

इंटरमीडिएट Git

Preparing Video For Download...