SlideShare a Scribd company logo
1 of 10
What is Git?
Git is a distributed version control system that is commonly used for
software development projects. It allows multiple developers to work on
the same codebase simultaneously. It tracks changes, maintains different
versions of the code, and helps in collaboration.
by Prakash Kumar Singh
Why use Git?
Collaborative
Development
Git enables seamless
collaboration among
developers by managing and
tracking changes in the
codebase, making it easier to
work together on projects.
Efficiency
Using Git streamlines the
development process, allowing
for faster and more efficient
management of code changes
and releases.
Version Control
Git provides a structured
approach to version control,
ensuring that previous versions
of the code are accessible and
revertible when needed.
Basic Git commands:
1 git init
Initializes a local
directory as a new Git
repository, enabling
version control for the
project.
2 git add
Stages changes in the
working directory,
preparing them to be
included in the next
commit.
3 git commit
Records changes to the
repository, creating a
checkpoint that allows
for future reference and
retrieval.
4 git status
Displays the state of the working directory
and any changes that are not yet staged
for commit.
5 git log
Shows a chronological history of commits,
including details about authors,
timestamps, and specific changes made.
Branching in Git:
1 Single Main Branch
By default, Git creates a primary branch called "master," representing the
main line of development.
2 Creating New Branches
Developers can create separate branches to work on new features or bug
fixes without impacting the main codebase.
3 Merging Branches
Git provides the ability to merge changes from one branch into another,
integrating new code while preserving development history.
Collaborative Remote Development:
Pushing & Pulling
Git allows developers to push
their local changes to a
remote repository and pull
changes made by others.
Remote Branches
Git enables the tracking of
remote branches, facilitating
collaboration and updates
with distributed teams.
Conflict Resolution
Remote development with Git
includes features for resolving
conflicts and maintaining
code consistency across
contributors.
Stashing and Pop:
1 Stashing Changes
Developers can temporarily store changes
with Git, allowing for the switch to another
task while retaining the current work.
2 Pop
if Something has changed and you want to
take another change without commiting
pop come into picture
Git Rebase and Reset:
1 Rebasing Commits
Git rebase allows developers to apply a
sequence of commits from one branch to
another, maintaining a linear project
history.
2 Resetting Changes
With Git reset, developers can revert
changes, selectively discard commits, and
restore the repository to a previous state.
Git Hooks and Workflows:
1 Using Hooks
Git hooks enable the execution of
custom scripts and automation at
specific points in the version control
workflow.
2 Workflow Strategies
Git supports various workflows,
including centralized, feature
branch, and gitflow, catering to
diverse project needs.
Git Graph and Visualization:
1 Commit Graphs
Visual representations of git commit
history and branches provide
insights and aid in understanding
project evolution.
2 Visualization Tools
Git visualization tools offer
interactive interfaces for exploring
commits, branches, and repository
changes visually.
Git Best Practices:
1 Commit Frequently
Regular small commits help in tracking changes and make it easier to identify and
isolate issues if they arise.
2 Use Meaningful Messages
Clear and descriptive commit messages provide valuable context and enhance
collaboration among team members.
3 Regular Pull Requests
Encourage team members to review each other's work through pull requests,
fostering a culture of feedback and improvement.
Backup and Recovery
Regular backups of the Git repository safeguard against data loss and provide
security in case of unexpected events.

More Related Content

Similar to What is git and its features for merge etc

Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 

Similar to What is git and its features for merge etc (20)

git Introduction.pptx
git Introduction.pptxgit Introduction.pptx
git Introduction.pptx
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Git and Github - A primer
Git and Github - A primerGit and Github - A primer
Git and Github - A primer
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Lodi Palle – The Cornerstone of Modern Software Development..pdf
Lodi Palle – The Cornerstone of Modern Software Development..pdfLodi Palle – The Cornerstone of Modern Software Development..pdf
Lodi Palle – The Cornerstone of Modern Software Development..pdf
 
Git tech
Git techGit tech
Git tech
 
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdfLearning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdf
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
 
Data science Git management
Data science Git managementData science Git management
Data science Git management
 
git & github.pdf
git & github.pdfgit & github.pdf
git & github.pdf
 
Do you git it
Do you git it Do you git it
Do you git it
 
Git overview
Git overviewGit overview
Git overview
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
GDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdfGDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdf
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 

Recently uploaded

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 

Recently uploaded (20)

Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 

What is git and its features for merge etc

  • 1. What is Git? Git is a distributed version control system that is commonly used for software development projects. It allows multiple developers to work on the same codebase simultaneously. It tracks changes, maintains different versions of the code, and helps in collaboration. by Prakash Kumar Singh
  • 2. Why use Git? Collaborative Development Git enables seamless collaboration among developers by managing and tracking changes in the codebase, making it easier to work together on projects. Efficiency Using Git streamlines the development process, allowing for faster and more efficient management of code changes and releases. Version Control Git provides a structured approach to version control, ensuring that previous versions of the code are accessible and revertible when needed.
  • 3. Basic Git commands: 1 git init Initializes a local directory as a new Git repository, enabling version control for the project. 2 git add Stages changes in the working directory, preparing them to be included in the next commit. 3 git commit Records changes to the repository, creating a checkpoint that allows for future reference and retrieval. 4 git status Displays the state of the working directory and any changes that are not yet staged for commit. 5 git log Shows a chronological history of commits, including details about authors, timestamps, and specific changes made.
  • 4. Branching in Git: 1 Single Main Branch By default, Git creates a primary branch called "master," representing the main line of development. 2 Creating New Branches Developers can create separate branches to work on new features or bug fixes without impacting the main codebase. 3 Merging Branches Git provides the ability to merge changes from one branch into another, integrating new code while preserving development history.
  • 5. Collaborative Remote Development: Pushing & Pulling Git allows developers to push their local changes to a remote repository and pull changes made by others. Remote Branches Git enables the tracking of remote branches, facilitating collaboration and updates with distributed teams. Conflict Resolution Remote development with Git includes features for resolving conflicts and maintaining code consistency across contributors.
  • 6. Stashing and Pop: 1 Stashing Changes Developers can temporarily store changes with Git, allowing for the switch to another task while retaining the current work. 2 Pop if Something has changed and you want to take another change without commiting pop come into picture
  • 7. Git Rebase and Reset: 1 Rebasing Commits Git rebase allows developers to apply a sequence of commits from one branch to another, maintaining a linear project history. 2 Resetting Changes With Git reset, developers can revert changes, selectively discard commits, and restore the repository to a previous state.
  • 8. Git Hooks and Workflows: 1 Using Hooks Git hooks enable the execution of custom scripts and automation at specific points in the version control workflow. 2 Workflow Strategies Git supports various workflows, including centralized, feature branch, and gitflow, catering to diverse project needs.
  • 9. Git Graph and Visualization: 1 Commit Graphs Visual representations of git commit history and branches provide insights and aid in understanding project evolution. 2 Visualization Tools Git visualization tools offer interactive interfaces for exploring commits, branches, and repository changes visually.
  • 10. Git Best Practices: 1 Commit Frequently Regular small commits help in tracking changes and make it easier to identify and isolate issues if they arise. 2 Use Meaningful Messages Clear and descriptive commit messages provide valuable context and enhance collaboration among team members. 3 Regular Pull Requests Encourage team members to review each other's work through pull requests, fostering a culture of feedback and improvement. Backup and Recovery Regular backups of the Git repository safeguard against data loss and provide security in case of unexpected events.