0% found this document useful (0 votes)
7 views

What is Git and Github_

Uploaded by

suresh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

What is Git and Github_

Uploaded by

suresh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

What is Git?

Git is a distributed version control system that allows developers to track changes in
their code, collaborate with others, and revert to previous versions when needed. It’s essential
for managing source code in software development projects.

What is GitHub?
GitHub is a cloud-based platform for hosting and managing Git repositories. It
provides additional tools for collaboration, pull requests, issue tracking, and more, making it
ideal for team-based development.

Why Git?
1. Version Control: Track changes over time, compare different versions, and revert if
needed.
2. Collaboration: Multiple developers can work on the same codebase without
overwriting each other's work.
3. Branching and Merging: Develop features in isolated branches and merge them when
stable.
4. Backup and Restore: Secure your code with a remote repository like GitHub.
5. Detailed audit tracking
• Git is a Version Control System → VCS Types: - • Distributed
• Centralized
1. Centralized Version Control System (CVCS)

In a Centralized VCS, a central server holds the only copy of the repository, and developers
access it to make changes.
• Single central repository on a server.
• Developers check out code, make changes, and check it back into the central server.
Examples: Subversion, Endevor
Pavan Kumar Jakkula
Disadvantages: -
• If the central server goes down, no one can access or commit code.
• Single point of failure
• Requires constant connectivity

2. Distributed Version Control System (DVCS)

In a Distributed VCS like Git, each developer has a complete copy of the entire repository,
including its history.
• Every developer clones the repository and works on their local copy.
• Changes are shared by pushing to and pulling from remote repositories.
Example: Git, Mercurial.
Advantages
• No dependency on a single server — developers can work offline.
• Each developer has a local copy & more scalable than centralized
• Easier branching and merging.
Disadvantages
• More complex model compared to CVCS.
• Requires understanding of local vs remote repository workflows.

Pavan Kumar Jakkula


Git Stages and Workflow: -
Git uses a three-stage architecture to manage files:
1. Working space: Where you modify files.
2. Staging Area (Index): Where changes are prepared for commit.
3. Local Repository: Where committed changes are stored.
Workflow: -

• git add: Moves changes from working directory to the staging area.

• git commit: Records changes from the staging area to the repository.

• git push: Sends committed changes to a remote repository (like GitHub).

Thank You Pavan Kumar Jakkula

You might also like