
यह कोर्स आपको modern development की सबसे ज़रूरी skill सिखाता है—version control। इसमें आप Git के core commands, real-world GitHub workflow (branches, pull requests, reviews) और open-source contribution की basic understanding पाएँगे। 1–2 हफ्तों में fast, practical और industry-ready skill build करने पर फोकस है। 🚀
Branching और Merging Git की सबसे powerful features हैं। इन्हीं की वजह से teams बिना main code तोड़े safely experiment कर पाती हैं — जैसे UdaanPath पर नए courses, pages या features add करना।
Branch एक अलग line of development होती है। इसका मतलब: आप main project से अलग होकर changes कर सकते हैं, बिना production code को affect किए।
Default branch को आमतौर पर main कहा जाता है।
main | |--- commit A |--- commit B |--- commit C
UdaanPath Example:
Main branch live website को represent करता है।
आप Git course के लिए नया chapter add कर रहे हैं —
तो आप अलग branch बनाते हैं।
git branch git-course
Branch list देखने के लिए:
git branch
git switch git-course
अब आप git-course branch पर काम कर रहे हैं।
main
|
|--- commit A
|--- commit B
\
|--- commit D (git-course)
|--- commit E
इस branch में आप freely changes कर सकते हैं:
git status git add . git commit -m "Add Branching & Merging chapter for Git course"
ये changes अभी main branch में नहीं गए हैं।
जब feature complete और tested हो जाए, तब उसे main branch में merge किया जाता है।
Step 1: main branch पर जाएँ
git switch main
Step 2: merge branch
git merge git-course
main | |--- commit A |--- commit B |--- commit C |--- commit D |--- commit E
Merge conflict तब आता है जब: एक ही file की same lines दो branches में अलग-अलग change हुई हों।
UdaanPath Example:
Main branch में course title बदला गया,
और git-course branch में उसी line पर description बदली गई।
<<<<<<< HEADGit & GitHub Course
=======Git for Beginners
>>>>>>> git-course
आपको manually decide करना होता है कि कौन सा code रखना है।
Git & GitHub for Programmers
Conflict solve करने के बाद:
git add . git commit -m "Resolve merge conflict in course title"
अगले chapter में हम सीखेंगे कि GitHub पर repository कैसे बनाते हैं और local Git को GitHub से connect कैसे करते हैं।