Printing is unavailable

This course is licensed for personal online viewing only.

Public preview • CL-P000000-C30-L365-43014DFD

Home Dashboard
Chapter 2 · Git Fundamentals

Git vs GitHub vs GitLab vs Bitbucket

3,776
words
21
min read
4
tools

1. Learning Outcomes#

या chapter नंतर तुम्हाला:

  • Git नेमके काय आहे आणि त्याचे मुख्य काम काय आहे ते समजेल
  • GitHub, GitLab आणि Bitbucket म्हणजे काय ते समजेल
  • Git आणि Git hosting platforms मधला फरक स्पष्ट करता येईल
  • Local Git आणि Remote Repository यांचा basic फरक समजेल
  • GitHub, GitLab किंवा Bitbucket कधी वापरले जातात ते समजेल
  • project मध्ये Git आणि remote platform एकत्र कसे काम करतात याची basic mental picture तयार होईल
  • interview मध्ये “Git vs GitHub” सारख्या प्रश्नाचे स्पष्ट उत्तर देता येईल

2. सुरुवातीला एक महत्त्वाचा confusion दूर करूया#

Git शिकताना beginners ला एक प्रश्न खूप वेळा पडतो:

“Git आणि GitHub एकच आहेत का?”

उत्तर आहे:

नाही.

Git आणि GitHub एकच गोष्ट नाहीत.

तसेच GitLab आणि Bitbucket हेही Git चे दुसरे नाव नाही.

सोप्या भाषेत:

  • Git → तुमच्या code मधील changes track करणारे version control tool
  • GitHub → Git repositories online ठेवण्यासाठी आणि team सोबत collaborate करण्यासाठी platform
  • GitLab → Git repository hosting आणि development workflow साठी platform
  • Bitbucket → Git repositories host आणि manage करण्यासाठी Atlassian चे platform

हे समजले की पुढचे Git learning खूप सोपे होते.


3. Git म्हणजे काय?#

समजा तुम्ही एका project वर काम करत आहात.

आज तुम्ही काही code लिहिला.

उद्या त्यात बदल केला.

परवा नवीन feature add केले.

पण नवीन change मुळे project बिघडला.

आता प्रश्न आहे:

कालचा working code कुठे आहे?

जर तुम्ही प्रत्येक वेळी अशा files तयार करत असाल:

TEXT
project-final
project-final-new
project-final-latest
project-final-latest-working
project-final-final

तर project manage करणे लवकरच confusing होईल.

Git ही problem solve करण्यात मदत करते.

4. Definition#

English Definition

Git is a distributed version control system used to track changes in files and manage different versions of a software project.

मराठी अर्थ

Git म्हणजे project मधील files मध्ये होणारे बदल track करण्यासाठी वापरले जाणारे Version Control System.

म्हणजे code कधी बदलला, काय बदलले आणि project च्या वेगवेगळ्या versions manage करण्यासाठी Git मदत करते.

Version Control म्हणजे काय?#

Version Control हा शब्द सुरुवातीला थोडा technical वाटू शकतो.

पण idea खूप सोपी आहे.

समजा तुमच्या project ची सुरुवातीची working version आहे.

नंतर तुम्ही login feature add केले.

त्यानंतर payment feature add केले.

Git च्या मदतीने project मध्ये वेळोवेळी झालेल्या अशा changes चा history व्यवस्थित ठेवता येतो.

म्हणून developer ला project ची फक्त current copy दिसत नाही.

त्याच्याकडे project कसा बदलत गेला याची history सुद्धा असते.

Key Idea

Git चे मुख्य काम code online ठेवणे नाही. Git चे मुख्य काम म्हणजे project मधील changes आणि versions manage करणे.


5. Git कुठे चालते?#

Git साधारणपणे developer च्या computer वर install केले जाते.

म्हणजे तुम्ही internet शिवायही अनेक Git operations करू शकता.

उदाहरणार्थ, तुम्ही:

  • project मध्ये Git सुरू करू शकता
  • changes track करू शकता
  • project च्या versions तयार करू शकता
  • history पाहू शकता

या सगळ्यासाठी GitHub account असणे आवश्यक नाही.

हे समजणे खूप महत्त्वाचे आहे.

Remember

Git वापरण्यासाठी GitHub आवश्यक नाही.


6. GitHub म्हणजे काय?#

आता दुसरी problem पाहूया.

तुमच्या laptop वर Git वापरून project manage केला.

पण तुम्ही team मध्ये काम करत असाल तर?

तुमचा code दुसऱ्या developer सोबत share करायचा असेल तर?

Project ची remote copy ठेवायची असेल तर?

Code review करायचा असेल तर?

यासाठी Git repository online किंवा network-accessible server वर ठेवणे उपयोगी ठरते.

अशा कामांसाठी GitHub सारखे platforms वापरले जातात.

7. GitHub ची सोपी कल्पना#

GitHub हे Git repositories host करण्यासाठी प्रसिद्ध platform आहे.

Developer आपला Git project GitHub वर ठेवू शकतो.

Team मधील इतर developers त्या repository सोबत काम करू शकतात.

GitHub मध्ये repository hosting व्यतिरिक्त collaboration साठी अनेक features मिळतात, जसे:

  • Pull Requests
  • Code Reviews
  • Issues
  • Project collaboration
  • Automation workflows
  • Access control

या features चा detailed वापर आपण Git शिकत असताना योग्य ठिकाणी पाहू.

आत्ता मुख्य फरक लक्षात ठेवा:

Git = Version Control Tool

GitHub = Git Repository Hosting + Collaboration Platform


8. Git आणि GitHub एकत्र कसे काम करतात?#

ही mental picture लक्षात ठेवा.

Visual Diagram80%

Rendering diagram…

या diagram मध्ये flow असा समजा:

  1. Developer आपल्या computer वर project वर काम करतो.
  2. Git त्या project च्या versions आणि changes manage करते.
  3. Developer कडे project ची Local Repository असू शकते.
  4. Project ची दुसरी repository remote server वर ठेवता येते.
  5. ती remote repository GitHub, GitLab किंवा Bitbucket सारख्या platform वर host केली जाऊ शकते.

इथे एक महत्त्वाची गोष्ट notice करा:

GitHub ने Git ची जागा घेतलेली नाही.

Git आणि GitHub एकमेकांशी संबंधित आहेत, पण त्यांची कामे वेगळी आहेत.


9. GitLab म्हणजे काय?#

GitLab हेही Git repositories host आणि manage करण्यासाठी वापरले जाणारे platform आहे.

GitHub प्रमाणे GitLab वरही teams code repositories ठेवू शकतात आणि collaboration करू शकतात.

GitLab मध्ये software development lifecycle शी संबंधित अनेक capabilities एकाच platform मध्ये उपलब्ध असू शकतात.

उदाहरणार्थ:

  • Git repository hosting
  • Merge Requests
  • Code Review
  • Issue tracking
  • CI/CD
  • Development workflow management
  • Access control

Merge Request म्हणजे काय?#

GitLab वापरताना तुम्हाला Merge Request हा term दिसू शकतो.

आत्ता एवढे समजा:

Developer ने केलेले changes main project मध्ये combine करण्यापूर्वी ते review करण्यासाठी request तयार केली जाऊ शकते.

GitHub मध्ये याच प्रकारच्या workflow साठी सामान्यतः Pull Request हा term वापरला जातो.

याचा deep workflow सध्या समजून घेण्याची गरज नाही.


10. GitLab ची एक महत्त्वाची use case#

काही organizations ना त्यांच्या development infrastructure वर जास्त control हवा असतो.

GitLab cloud service म्हणून वापरता येते आणि self-managed environment मध्येही deploy करता येते.

म्हणून organization च्या infrastructure requirements नुसार GitLab निवडले जाऊ शकते.

महत्त्वाचे

GitLab फक्त “GitHub ची copy” म्हणून समजू नका. दोन्ही Git-based collaboration platforms आहेत, पण त्यांची ecosystem, workflow capabilities आणि organizational use cases वेगळी असू शकतात.


11. Bitbucket म्हणजे काय?#

Bitbucket हे Atlassian चे Git repository hosting आणि collaboration platform आहे.

Atlassian ecosystem वापरणाऱ्या teams मध्ये Bitbucket तुम्हाला विशेषतः दिसू शकते.

उदाहरणार्थ organization आधीपासून:

  • Jira
  • Confluence
  • इतर Atlassian tools

वापरत असेल, तर Bitbucket त्या workflow मध्ये integrate केलेले असू शकते.

Bitbucket मध्येही Git repositories manage करता येतात आणि team collaboration करता येते.

यामध्ये repository management सोबत:

  • Pull Requests
  • Code Review
  • Permissions
  • Pipelines
  • Jira integration

यासारख्या capabilities वापरल्या जाऊ शकतात.


12. GitHub, GitLab आणि Bitbucket मधला basic फरक#

हे तिन्ही platforms Git repositories सोबत काम करू शकतात.

पण ते स्वतः Git नाहीत.

Technology मुख्य भूमिका
Git Version control system
GitHub Git repository hosting आणि collaboration platform
GitLab Git repository hosting आणि integrated development workflow platform
Bitbucket Atlassian ecosystem शी मजबूत integration असलेले Git repository hosting platform

ही table पाठ करण्यापेक्षा concept समजून घ्या.

Git हे underlying version control tool आहे.

GitHub, GitLab आणि Bitbucket हे Git-based projects remote environment मध्ये host आणि collaborate करण्यासाठी platforms आहेत.


13. Local Git म्हणजे काय?#

Local म्हणजे तुमच्या स्वतःच्या computer वर असलेले environment.

तुम्ही project वर Git वापरत असाल तर project ची Git repository तुमच्या machine वर असू शकते.

तिला साधारणपणे Local Repository म्हणतो.

उदाहरण:

तुम्ही laptop वर Java project तयार केला.

त्या project साठी Git वापरायला सुरुवात केली.

Git ची project history तुमच्या local machine वर manage होत असेल.

तर तुम्ही local Git environment मध्ये काम करत आहात.


14. Remote Git म्हणजे नेमके काय?#

Beginners मध्ये Remote Git हा phrase वापरला जातो.

पण technical understanding साठी थोडे स्पष्ट करूया.

Git ची वेगळी “Remote Git” नावाची product version नसते.

आपण सामान्यतः remote repository बद्दल बोलतो.

Remote Repository म्हणजे developer च्या local machine च्या बाहेर उपलब्ध असलेली Git repository.

ती उदाहरणार्थ:

  • GitHub वर
  • GitLab वर
  • Bitbucket वर
  • organization च्या स्वतःच्या server वर

असू शकते.

Common Mistake

Local Git आणि GitHub यांना Git च्या दोन versions समजू नका.

Git हे version control system आहे. GitHub हा Git repositories host करण्यासाठी वापरला जाणारा platform आहे.


15. Local आणि Remote यांची सोपी तुलना#

समजा तुम्ही एक project स्वतःच्या laptop वर तयार केला.

Local#

Laptop वरील project आणि त्याची Git repository:

TEXT
Your Laptop
    |
    └── Project
         └── Local Git Repository

ही local side आहे.

Remote#

त्या project ची repository GitHub वर ठेवली:

TEXT
Internet / Network
    |
    └── GitHub
         └── Remote Repository

आता project शी संबंधित repository दोन ठिकाणी असू शकते:

  • तुमच्या computer वर local repository
  • server/platform वर remote repository

दोन्ही repositories Git ecosystem चा भाग म्हणून एकत्र काम करू शकतात.


16. Local आणि Remote का आवश्यक आहेत?#

एक developer एकटाच काम करत असेल तरी local Git खूप उपयोगी आहे.

कारण project history आणि versions manage करता येतात.

पण team development मध्ये remote repository विशेषतः महत्त्वाची ठरते.

कारण अनेक developers ना एकाच project सोबत collaborate करायचे असते.

उदाहरण पाहूया.

एक software team आहे:

  • Rahul → Backend Developer
  • Priya → Frontend Developer
  • Amit → Tester

जर project फक्त Rahul च्या laptop वर असेल, तर collaboration कठीण होईल.

पण project ची remote repository GitHub, GitLab किंवा Bitbucket वर असेल तर team controlled workflow मधून त्याच project वर काम करू शकते.


17. Real Project Mental Model#

एका company मध्ये development साधारण अशा प्रकारे दिसू शकते:

Visual Diagram80%

Rendering diagram…

इथे तीन developers वेगवेगळ्या computers वर आहेत.

प्रत्येक developer आपले local development environment वापरतो.

Remote platform team साठी shared collaboration point म्हणून काम करते.

याचा अर्थ सगळे developers एकाच physical folder मध्ये काम करत नाहीत.

प्रत्येक developer कडे local working copy असू शकते आणि remote repository team ला project coordinate करण्यास मदत करते.


18. मग GitHub, GitLab की Bitbucket?#

याचे एक universal उत्तर नाही.

Company कोणती platform वापरेल हे अनेक practical factors वर अवलंबून असते.

GitHub कधी दिसू शकते?#

GitHub अनेक:

  • open-source projects
  • personal projects
  • software teams
  • public repositories
  • private company repositories

मध्ये वापरले जाते.

GitHub चे developer ecosystem खूप मोठे असल्यामुळे तुम्हाला learning, open-source आणि professional development मध्ये GitHub वारंवार दिसेल.

GitLab कधी दिसू शकते?#

GitLab अशा teams मध्ये वापरले जाऊ शकते जिथे:

  • Git repository hosting हवे आहे
  • integrated development workflow हवा आहे
  • CI/CD capabilities महत्त्वाच्या आहेत
  • self-managed deployment आवश्यक आहे

Bitbucket कधी दिसू शकते?#

Bitbucket विशेषतः अशा organizations मध्ये दिसू शकते ज्या Atlassian ecosystem वापरतात.

उदाहरणार्थ:

  • Jira मधून work track करणे
  • Bitbucket मध्ये code repository ठेवणे
  • development आणि issue-management workflow integrate करणे

19. Developer ने सर्व platforms शिकायला हवेत का?#

Beginner म्हणून सर्व platforms चे प्रत्येक feature शिकण्याची गरज नाही.

सर्वात आधी underlying Git concepts मजबूत करा.

कारण Git समजले की GitHub, GitLab आणि Bitbucket यांच्यासोबत काम करणे खूप सोपे होते.

Platforms चे UI वेगवेगळे असू शकतात.

काही terminology वेगळी असू शकते.

काही additional features वेगळे असू शकतात.

पण Git चे मूलभूत concepts transferable असतात.

Key Idea

Platform बदलू शकतो. Git चे core knowledge मात्र developer सोबत राहते.


20. एक practical example#

समजा तुम्ही company मध्ये Java Developer म्हणून join झाला.

तुम्ही आधी GitHub वापरले आहे.

पण नवीन company GitLab वापरते.

याचा अर्थ तुम्हाला Git पुन्हा शून्यापासून शिकावा लागेल का?

नाही.

जर Git चे fundamentals clear असतील, तर मोठा भाग आधीपासूनच उपयोगी पडतो.

तुम्हाला मुख्यतः त्या company चा:

  • GitLab workflow
  • repository permissions
  • merge process
  • review process
  • CI/CD process

समजून घ्यावा लागेल.

त्याचप्रमाणे company Bitbucket वापरत असेल तरी underlying Git knowledge उपयोगी राहते.


21. Git आणि Platforms लक्षात ठेवण्याची सोपी पद्धत#

ही एक साधी mental model वापरा:

Git → Engine

GitHub / GitLab / Bitbucket → त्या engine भोवती repository hosting आणि collaboration देणारे platforms

ही analogy फक्त फरक लक्षात ठेवण्यासाठी आहे.

Actual technical अर्थ असा आहे:

Git हे distributed version control system आहे.

GitHub, GitLab आणि Bitbucket हे Git repositories host आणि teams ना collaborate करण्यासाठी capabilities देतात.


22. Common Beginner Confusions#

GitHub account नसेल तर Git वापरता येते का?#

हो.

Git तुमच्या local computer वर स्वतंत्रपणे वापरता येते.

GitHub account Git चालण्यासाठी compulsory नाही.


GitHub install करावे लागते का?#

Git वापरण्यासाठी मुख्य tool म्हणजे Git.

GitHub एक hosted platform आहे.

GitHub शी काम करण्यासाठी browser, Git commands किंवा supported client tools वापरले जाऊ शकतात.


GitHub वर project ठेवला म्हणजे Git शिकण्याची गरज नाही का?#

नाही.

GitHub ची UI काही operations सोपी करू शकते.

पण professional development साठी Git चे fundamentals समजणे महत्त्वाचे आहे.


GitLab आणि GitHub दोन्ही वापरावे लागतात का?#

आवश्यक नाही.

तुमची organization किंवा project कोणते platform वापरते त्यावर हे अवलंबून असते.

Git fundamentals मात्र कोणत्याही Git-based platform सोबत उपयोगी पडतात.


Bitbucket वापरत असेल तर Git वेगळी असते का?#

नाही.

Bitbucket सोबतही Git repositories वापरल्या जातात.

Platform बदलले म्हणून Git चे core concepts बदलत नाहीत.


23. Interview Preparation#

What is the difference between Git and GitHub?Show Answer

Git is a distributed version control system used to track and manage changes in source code. GitHub is a platform that hosts Git repositories and provides collaboration features such as pull requests, code reviews, issue tracking, and automation.

Key Points:

  • Git is a version control system.
  • Git can work locally.
  • GitHub hosts Git repositories.
  • GitHub provides team collaboration features.
  • Git and GitHub are related but are not the same product.

Why interviewer asks this:

The interviewer wants to verify that the candidate understands the difference between the version control technology and a repository hosting platform.


What is the difference between GitHub, GitLab, and Bitbucket?Show Answer

GitHub, GitLab, and Bitbucket are platforms that host Git repositories and support software-development collaboration. They differ in their ecosystems, integrated development features, deployment options, and organizational use cases. GitLab is commonly associated with integrated DevOps workflows and self-managed deployment options, while Bitbucket integrates strongly with Atlassian products such as Jira.

Key Points:

  • All three can host Git repositories.
  • They provide collaboration features around Git.
  • Their workflows and integrated services differ.
  • The underlying Git knowledge remains applicable across these platforms.

Why interviewer asks this:

The interviewer wants to know whether the candidate can distinguish Git itself from tools and services built around Git.


What is the difference between a local repository and a remote repository?Show Answer

A local repository exists on the developer's machine, while a remote repository is stored at another accessible location such as GitHub, GitLab, Bitbucket, or an organization-managed server. Developers use local repositories for their work and can synchronize changes with remote repositories for collaboration and shared project management.

Key Points:

  • Local repository exists on the developer's computer.
  • Remote repository exists outside the local working environment.
  • A remote repository can support team collaboration.
  • GitHub is only one possible remote hosting platform.

Why interviewer asks this:

This checks whether the candidate understands the basic distributed nature of Git-based development.


24. Hands-On Practice#

Practice 1#

Requirement

Identify whether each item is a version control system or a repository hosting/collaboration platform:

  • Git
  • GitHub
  • GitLab
  • Bitbucket

Your Task

Write the correct category for each item.

HintShow Hint

Only one item in the list is the actual version control system.

SolutionShow Solution
  • Git → Version Control System
  • GitHub → Git Repository Hosting and Collaboration Platform
  • GitLab → Git Repository Hosting and Development Platform
  • Bitbucket → Git Repository Hosting and Collaboration Platform

Explanation

इथे सर्वात महत्त्वाची गोष्ट म्हणजे Git ला बाकी तीन platforms पासून वेगळे ओळखणे.

Git project changes आणि versions manage करते.

बाकी platforms Git repositories host करून collaboration साठी additional capabilities देतात.


Practice 2#

Requirement

एका developer ने laptop वर project तयार केला आणि Git वापरून versions manage केले.

त्याने अजून project GitHub, GitLab किंवा Bitbucket वर upload केलेला नाही.

Your Task

Git वापरणे शक्य आहे का ते ठरवा.

HintShow Hint

GitHub आणि Git एकच आहेत का हे आठवा.

SolutionShow Solution

हो.

Developer local machine वर Git वापरू शकतो.

GitHub, GitLab किंवा Bitbucket account नसतानाही local Git repository वापरणे शक्य आहे.

Explanation

Git स्वतंत्र version control system आहे.

Remote hosting platform वापरणे ही वेगळी गोष्ट आहे.


Practice 3#

Requirement

एका company मध्ये Jira आधीपासून मोठ्या प्रमाणात वापरले जाते आणि source-code repositories साठी Atlassian ecosystem सोबत integration महत्त्वाचे आहे.

Your Task

या requirement शी सामान्यतः कोणते Git hosting platform संबंधित असू शकते ते ओळखा.

HintShow Hint

Atlassian च्या Git repository platform चा विचार करा.

SolutionShow Solution

Bitbucket.

Explanation

Bitbucket हे Atlassian ecosystem चा भाग आहे आणि Jira सारख्या Atlassian products सोबत integration देऊ शकते.

याचा अर्थ प्रत्येक Jira वापरणाऱ्या company ने Bitbucketच वापरले पाहिजे असा नाही.

Platform selection company च्या actual requirements वर अवलंबून असते.


25. या chapter मधून काय लक्षात ठेवायचे?#

  • Git हे Version Control System आहे.
  • GitHub म्हणजे Git नाही.
  • GitLab म्हणजे Git नाही.
  • Bitbucket म्हणजे Git नाही.
  • Git local computer वर स्वतंत्रपणे वापरता येते.
  • Remote repository developer च्या local machine बाहेर उपलब्ध असते.
  • GitHub, GitLab आणि Bitbucket remote Git repositories host करू शकतात.
  • GitHub अनेक open-source आणि software projects मध्ये वापरले जाते.
  • GitLab integrated development आणि DevOps-oriented workflows साठी वापरले जाऊ शकते.
  • Bitbucket Atlassian ecosystem सोबत मजबूत integration देतो.
  • कोणताही hosting platform वापरला तरी मजबूत Git fundamentals उपयोगी राहतात.
Remember

आधी Git समजा. नंतर GitHub, GitLab किंवा Bitbucket चे workflow समजणे खूप सोपे होईल.

Interactive learning

Practice lab

Apply this chapter with guided activities, immediate feedback, explanations, and retry.

Practice loads when this section enters view.