SlideShare a Scribd company logo
SE Tools and Practices
(SE 2142)
Consultation Time
TF - 1300-1430
Course Syllabus
Classroom Rules
Late Policy:
You will be marked late if I have already finished checking attendance, but you are still welcome to join the class.
Materials for Seat-Work or Quizzes:
Please bring newsprint, a blue or black pen, and preferably a red pen for checking.
What If:
● You forget to bring a pen or newsprint? I’ll give you time to review, during which you can purchase them from the canteen.
● You don’t have a red pen for checking? It’s okay as long as there are no erasures or overwriting on the answers on your newsprint, or it is better if you use a different color pen.
If you fail to follow these instructions after being reminded, your score will be 0 for not adhering to the guidelines. ;)
Quizzes:
Chapter quizzes will be announced in advance, while other quizzes may occur at any time during the course, often following discussions.
** Take note and listen :)
**The purpose of this is to help you get accustomed to following instructions, even the small ones.
After all, in the future, no matter how well you design a system, it could still be rejected if you overlook a single simple
requirement. :)
What is version control?
Version control, also known as source control, is the practice of tracking and managing changes to
software code.
Version control systems are software tools that help software teams manage changes to source
code over time so that you can recall specific versions later.
Version control helps solve these kinds of problems and provides:
● complete history of every file
● ability to work on independent streams of changes
● ability to trace each change
Types of Version Control Systems
Centralized Version Control (CVCS):
● A single server stores all versions of the files.
● Developers “check out” files to make changes.
● Example: Subversion (SVN).
Distributed Version Control (DVCS):
● Each developer has a complete copy of the repository.
● Changes can be committed locally before sharing.
● Example: Git, Mercurial.
Why use version control?
Collaboration:
● Multiple developers can work on the same project simultaneously.
● Avoids conflicts by merging changes from different developers.
History Tracking:
● Every change is logged with a timestamp, author, and message.
● Provides a full history of the project.
Backup and Restore:
● Easy to restore previous versions of files.
● Protects against accidental loss of data.
Branching and Merging:
● Allows working on multiple features or fixes in parallel.
● Changes can be merged into the main project seamlessly.
Real-World Example of Version Control
Scenario: A team of developers is working on a software project.
Without Version Control:
● Difficulty tracking changes.
● High risk of overwriting each other's work.
● No easy way to revert to a previous stable state.
With Version Control:
● Each developer works on their own branch.
● Changes are tracked, reviewed, and merged.
● Ability to revert to previous versions if a bug is introduced.
What is Git?
By far, the most widely used modern version control system in the world today is Git. Git is a mature,
actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous
creator of the Linux operating system kernel.
Git is an example of a DVCS (hence Distributed Version Control System).
Performance
Committing new changes, branching, merging and comparing past versions are all optimized for performance.
Unlike some version control software, Git is not fooled by the names of the files when determining what the storage and
version history of the file tree should be, instead, Git focuses on the file content itself.
Security
The content of the files as well as the true relationships between files and directories, versions, tags and commits, all of
these objects in the Git repository are secured with a cryptographically secure hashing algorithm called SHA1.
Flexibility
Git is flexible in several respects: in support for various kinds of nonlinear development workflows, in its efficiency in both
small and large projects and in its compatibility with many existing systems and protocols.
In addition to being distributed, Git has been designed with performance, security and flexibility in mind.
Version control with Git
Git is Good:
Git offers the functionality, performance, security, and flexibility that most developers need, making it a strong choice compared to
alternatives.
Git is a De Facto Standard:
Git is widely adopted, making it easy for teams to find developers with Git experience and access to many integrated tools and
services.
Git is a Quality Open Source Project:
Git is a well-supported, open-source project with strong community support, excellent documentation, and a decade of reliable
stewardship.
Criticism of Git:
While Git has a learning curve, especially for new users, its powerful features ultimately enhance development speed and flexibility.
Git for developers
Feature branch workflow
Feature branches provide an isolated
environment for every change to your
codebase. When a developer wants to start
working on something—no matter how big
or small—they create a new branch. This
ensures that the main branch always
contains production-quality code.
Distributed development
In SVN, each developer gets a working copy that points back to a single central repository. Git, however, is a distributed
version control system. Instead of a working copy, each developer gets their own local repository, complete with a full
history of commits.
Pull request
A pull request is a way to ask another developer to merge one of your branches into their repository. This not only
makes it easier for project leads to keep track of changes, but also lets developers initiate discussions around their
work before integrating it with the rest of the codebase.
Community
In many circles, Git has come to be the expected version control system for new projects. If your team is using Git,
odds are you won’t have to train new hires on your workflow, because they’ll already be familiar with distributed
development.
Fastest release cycle
The ultimate result of feature branches, distributed development, pull requests, and a stable community is a faster
release cycle. These capabilities facilitate an agile workflow where developers are encouraged to share smaller
changes more frequently. I
Basic Git Commands
● git init: How to initialize a new repository.
● git clone: How to clone an existing repository
● git add: How to stage changes.
● git commit: How to commit staged changes.
● git status: How to check the status of the working directory and staging area.
● git log: How to view commit history.
Working with branches
Creating and Switching Branches
● git branch: How to create a new branch.
git branch new_branch
● git checkout: How to switch between branches
git checkout [<branch>]
Merging Branches
● git merge: How to merge branches.
Comparing Git with Other Version Control Systems
Software Engineering Tools and Practices Learn Git
Summary
What is Git?
● Distributed Version Control System (DVCS)
● Tracks changes in source code during software development
Key Features:
● Distributed Architecture: Each user has a full copy of the repository, enabling offline work and redundancy.
● Branching and Merging: Efficient, lightweight branches and advanced merging capabilities support flexible workflows.
● Performance: Fast local operations and optimized storage using delta encoding.
● Data Integrity: Uses SHA-1 hashing to ensure data integrity and detect corruption.
● Customization: Supports various workflows, custom hooks, and extensions.
● Ecosystem: Extensive integration with platforms like GitHub, GitLab, and Bitbucket.
● Open Source: Free to use and actively developed with contributions from a large community.
Review/Break
Software Engineering Tools and Practices Learn Git
Ad

More Related Content

Similar to Software Engineering Tools and Practices Learn Git (20)

Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Sahil Agarwal
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
SawanBhattacharya
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
Vikram SV
 
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
saurabhpandeychp1
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
DSCVSSUT
 
Version Control, Writers, and Workflows
Version Control, Writers, and WorkflowsVersion Control, Writers, and Workflows
Version Control, Writers, and Workflows
stc-siliconvalley
 
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 and Github and how can we leverage in Daily Coding
Git and Github and how can we leverage in Daily CodingGit and Github and how can we leverage in Daily Coding
Git and Github and how can we leverage in Daily Coding
wrdxtevhxiseyweuiw
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
MohanRaviRohitth
 
Gitting better
Gitting betterGitting better
Gitting better
Ali Servet Donmez
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
git Introduction.pptx
git Introduction.pptxgit Introduction.pptx
git Introduction.pptx
PrakharYadav58
 
You can git
You can gitYou can git
You can git
Yu GUAN
 
Introductio to Git and GitHub Session 2 by gdg on campus kab
Introductio to Git and GitHub Session 2 by gdg on campus kabIntroductio to Git and GitHub Session 2 by gdg on campus kab
Introductio to Git and GitHub Session 2 by gdg on campus kab
makobisimon
 
Git workshop
Git workshopGit workshop
Git workshop
Reslan Al Tinawi
 
Git
GitGit
Git
Okba Mahdjoub
 
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.
Bhavya Chawla
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Perforce helix git swarm jan 2016(pva1) meetup
Perforce helix git swarm jan 2016(pva1) meetupPerforce helix git swarm jan 2016(pva1) meetup
Perforce helix git swarm jan 2016(pva1) meetup
dsdata systems
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Sahil Agarwal
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
Vikram SV
 
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
Git GitHub jsdbcghsvchjsbcmshg cv ddcsd cjhsbdcjhbdscbc gs cgsvcsbcdbdkjcbsdk...
saurabhpandeychp1
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
DSCVSSUT
 
Version Control, Writers, and Workflows
Version Control, Writers, and WorkflowsVersion Control, Writers, and Workflows
Version Control, Writers, and Workflows
stc-siliconvalley
 
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 and Github and how can we leverage in Daily Coding
Git and Github and how can we leverage in Daily CodingGit and Github and how can we leverage in Daily Coding
Git and Github and how can we leverage in Daily Coding
wrdxtevhxiseyweuiw
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
You can git
You can gitYou can git
You can git
Yu GUAN
 
Introductio to Git and GitHub Session 2 by gdg on campus kab
Introductio to Git and GitHub Session 2 by gdg on campus kabIntroductio to Git and GitHub Session 2 by gdg on campus kab
Introductio to Git and GitHub Session 2 by gdg on campus kab
makobisimon
 
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.
Bhavya Chawla
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Perforce helix git swarm jan 2016(pva1) meetup
Perforce helix git swarm jan 2016(pva1) meetupPerforce helix git swarm jan 2016(pva1) meetup
Perforce helix git swarm jan 2016(pva1) meetup
dsdata systems
 

Recently uploaded (20)

How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Ad

Software Engineering Tools and Practices Learn Git

  • 1. SE Tools and Practices (SE 2142)
  • 4. Classroom Rules Late Policy: You will be marked late if I have already finished checking attendance, but you are still welcome to join the class. Materials for Seat-Work or Quizzes: Please bring newsprint, a blue or black pen, and preferably a red pen for checking. What If: ● You forget to bring a pen or newsprint? I’ll give you time to review, during which you can purchase them from the canteen. ● You don’t have a red pen for checking? It’s okay as long as there are no erasures or overwriting on the answers on your newsprint, or it is better if you use a different color pen. If you fail to follow these instructions after being reminded, your score will be 0 for not adhering to the guidelines. ;) Quizzes: Chapter quizzes will be announced in advance, while other quizzes may occur at any time during the course, often following discussions. ** Take note and listen :) **The purpose of this is to help you get accustomed to following instructions, even the small ones. After all, in the future, no matter how well you design a system, it could still be rejected if you overlook a single simple requirement. :)
  • 5. What is version control? Version control, also known as source control, is the practice of tracking and managing changes to software code. Version control systems are software tools that help software teams manage changes to source code over time so that you can recall specific versions later.
  • 6. Version control helps solve these kinds of problems and provides: ● complete history of every file ● ability to work on independent streams of changes ● ability to trace each change
  • 7. Types of Version Control Systems Centralized Version Control (CVCS): ● A single server stores all versions of the files. ● Developers “check out” files to make changes. ● Example: Subversion (SVN). Distributed Version Control (DVCS): ● Each developer has a complete copy of the repository. ● Changes can be committed locally before sharing. ● Example: Git, Mercurial.
  • 8. Why use version control? Collaboration: ● Multiple developers can work on the same project simultaneously. ● Avoids conflicts by merging changes from different developers. History Tracking: ● Every change is logged with a timestamp, author, and message. ● Provides a full history of the project. Backup and Restore: ● Easy to restore previous versions of files. ● Protects against accidental loss of data. Branching and Merging: ● Allows working on multiple features or fixes in parallel. ● Changes can be merged into the main project seamlessly.
  • 9. Real-World Example of Version Control Scenario: A team of developers is working on a software project. Without Version Control: ● Difficulty tracking changes. ● High risk of overwriting each other's work. ● No easy way to revert to a previous stable state. With Version Control: ● Each developer works on their own branch. ● Changes are tracked, reviewed, and merged. ● Ability to revert to previous versions if a bug is introduced.
  • 10. What is Git? By far, the most widely used modern version control system in the world today is Git. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel. Git is an example of a DVCS (hence Distributed Version Control System).
  • 11. Performance Committing new changes, branching, merging and comparing past versions are all optimized for performance. Unlike some version control software, Git is not fooled by the names of the files when determining what the storage and version history of the file tree should be, instead, Git focuses on the file content itself. Security The content of the files as well as the true relationships between files and directories, versions, tags and commits, all of these objects in the Git repository are secured with a cryptographically secure hashing algorithm called SHA1. Flexibility Git is flexible in several respects: in support for various kinds of nonlinear development workflows, in its efficiency in both small and large projects and in its compatibility with many existing systems and protocols. In addition to being distributed, Git has been designed with performance, security and flexibility in mind.
  • 12. Version control with Git Git is Good: Git offers the functionality, performance, security, and flexibility that most developers need, making it a strong choice compared to alternatives. Git is a De Facto Standard: Git is widely adopted, making it easy for teams to find developers with Git experience and access to many integrated tools and services. Git is a Quality Open Source Project: Git is a well-supported, open-source project with strong community support, excellent documentation, and a decade of reliable stewardship. Criticism of Git: While Git has a learning curve, especially for new users, its powerful features ultimately enhance development speed and flexibility.
  • 13. Git for developers Feature branch workflow Feature branches provide an isolated environment for every change to your codebase. When a developer wants to start working on something—no matter how big or small—they create a new branch. This ensures that the main branch always contains production-quality code.
  • 14. Distributed development In SVN, each developer gets a working copy that points back to a single central repository. Git, however, is a distributed version control system. Instead of a working copy, each developer gets their own local repository, complete with a full history of commits.
  • 15. Pull request A pull request is a way to ask another developer to merge one of your branches into their repository. This not only makes it easier for project leads to keep track of changes, but also lets developers initiate discussions around their work before integrating it with the rest of the codebase.
  • 16. Community In many circles, Git has come to be the expected version control system for new projects. If your team is using Git, odds are you won’t have to train new hires on your workflow, because they’ll already be familiar with distributed development.
  • 17. Fastest release cycle The ultimate result of feature branches, distributed development, pull requests, and a stable community is a faster release cycle. These capabilities facilitate an agile workflow where developers are encouraged to share smaller changes more frequently. I
  • 18. Basic Git Commands ● git init: How to initialize a new repository. ● git clone: How to clone an existing repository ● git add: How to stage changes. ● git commit: How to commit staged changes. ● git status: How to check the status of the working directory and staging area. ● git log: How to view commit history.
  • 19. Working with branches Creating and Switching Branches ● git branch: How to create a new branch. git branch new_branch ● git checkout: How to switch between branches git checkout [<branch>] Merging Branches ● git merge: How to merge branches.
  • 20. Comparing Git with Other Version Control Systems
  • 22. Summary What is Git? ● Distributed Version Control System (DVCS) ● Tracks changes in source code during software development Key Features: ● Distributed Architecture: Each user has a full copy of the repository, enabling offline work and redundancy. ● Branching and Merging: Efficient, lightweight branches and advanced merging capabilities support flexible workflows. ● Performance: Fast local operations and optimized storage using delta encoding. ● Data Integrity: Uses SHA-1 hashing to ensure data integrity and detect corruption. ● Customization: Supports various workflows, custom hooks, and extensions. ● Ecosystem: Extensive integration with platforms like GitHub, GitLab, and Bitbucket. ● Open Source: Free to use and actively developed with contributions from a large community.