×
Pila do ek Chai? | छोटी सी मदद? ☕

If you like our notes, please support the creator!

NotesLover UPI QR

UPI ID: sa786bh@okaxis

Official NotesLover Support

"Padhai toh hoti rahegi, par bina Chai ke dimag ki batti kaise jalegi?" 💡

Aapki help se hum aur bhi FREE notes bana payenge.
Your small contribution keeps us motivated to create more!

Support via UPI (कोई भी राशि) 🚀

CS NOTES

0 Likes

 

126 Views

 

9 Pages

 

Free

 

0 Ratings

Mastering Git & GitHub: A Complete Beginner's Guide

Learn the basics of Git and GitHub, including repositories, commits, branches, merges, and pull requests. This step-by-step guide is perfect for beginners who want to manage code efficiently and collaborate with others. Read more >
Can't find your notes? We'll provide them for free!
(नोट्स नहीं मिल रहे? हम फ्री में देंगे!)


NotesLover provides free educational notes for learning purposes only. Content owners may request removal. Click Here.

NotesLover केवल शैक्षणिक उद्देश्य के लिए निःशुल्क अध्ययन सामग्री प्रदान करता है। यदि आप सामग्री के स्वामी हैं और किसी भी सामग्री को हटवाना चाहते हैं, तो यहाँ क्लिक करें

Preview Mode: The preview below shows limited pages only. To access the complete document, please click the "View Full PDF" button located just below this box.
नीचे दिए गए प्रीव्यू में सीमित पेज ही दिखेंगे। पूरे नोट्स के लिए इस बॉक्स के ठीक नीचे दिए गए "View Full PDF" बटन पर क्लिक करें।
Share Ratings Report

Git & GitHub: A Simple Guide

Git is a version control system used by developers to track changes in code. GitHub is a platform that hosts Git repositories online, making it easier to share code and collaborate with others.

Whether you are a student, a developer, or someone learning programming, understanding Git and GitHub is essential. In this guide, we’ll explain the key concepts and commands in simple terms.

1. Git Repository (Repo)

A repository is where your project files and history are stored. Every project you create or contribute to will have a repository.

Steps to create a repo on GitHub:

  • Log in to GitHub and click New Repository.
  • Give it a name, for example, my-first-project.
  • Add a description if needed.
  • Choose Public to allow others to see it or Private to keep it personal.
  • Click Create Repository.

Clone a repo to your local machine:

git clone https://github.com/username/repo-name.git

2. Git Commit

A commit is like a snapshot of your project at a particular point in time. It helps you track changes.

Commands:

  • Stage changes:
    git add filename
  • Commit changes:
    git commit -m "Added a new feature"

3. Branching in Git

Branches allow you to work on different features without affecting the main project.

Commands:

  • Create a branch:
    git branch feature-branch
  • Switch to a branch:
    git checkout feature-branch

4. Git Merge

Merging brings changes from one branch into another. For example, when a feature is ready, you merge it into the main branch.

Merge a branch:

git checkout main
git merge feature-branch

Tip: If there are conflicts, Git will ask you to resolve them manually before completing the merge.

5. Pull and Push

To synchronize your local repo with GitHub:

  • Pull changes from GitHub:
    git pull origin main
  • Push local commits to GitHub:
    git push origin main

6. Forking and Pull Requests

  • Forking: Makes your own copy of someone else’s repository so you can make changes.
  • Pull Request: After making changes in your fork, you can request the original repo owner to merge your changes.

7. Benefits of Git and GitHub

  • Tracks every change in your project
  • Helps collaborate with multiple developers
  • Acts as a backup for your code
  • Lets you contribute to open-source projects

Git GitHub Git commands Git merge Git branch Git repository version control pull request

Reviews

No review available.

To leave a comment, please log in.

Log in to Comment

© 2026 Notes Lover. All rights reserved.

Back to top