SlideShare a Scribd company logo
- Behzad Altaf
A 2-3-5-7-11-13…-r
Agenda
• Version Control
• What
• Why
• Types
• How
• Git
• History
• Fundamentals
• Basic Commands
• Branching
• Working with remote
• Further reading/ references
• Tips
Git - An Introduction
Version Control
• In computer software engineering, revision control is any kind of practice
that tracks and provides control over changes to source code.
• Version control is a system that records changes to a file or set of files over
time so that you can recall specific versions later.
https://en.wikipedia.org/wiki/Version_control
Version Control – Why?
Version Control – Why?
http://www.webdesignerdepot.com/2009/03/intro-to-git-for-web-designers/
Version Control – Why?
Version Control - Local
https://git-scm.com/book/en/v2
Version Control - Centralized
https://git-scm.com/book/en/v2
Version Control - Distributed
https://git-scm.com/book/en/v2
Version Control - options
Git - An Introduction
What is git?
Distributed Performant Reliable
Git – History
• The Linux kernel is an open source software project of fairly large scope. For most of the lifetime of the
Linux kernel maintenance (1991–2002), changes to the software were passed around as patches and
archived files. In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper.
• In 2005, the relationship between the community that developed the Linux kernel and the commercial
company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This
prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to
develop their own tool based on some of the lessons they learned while using BitKeeper.
https://git-scm.com/book/en/v2
Git - Data Storage
Storing data as changes to a base version of each file.
Storing data as snapshots of the project over time.
https://git-scm.com/book/en/v2
Git - The Sections
https://git-scm.com/book/en/v2
Git - The Sections
http://www.slideshare.net/nullstein/git-usage-patterns
https://git-scm.com/book/en/v2
Git - File Lifecycle
GIT Installation
git for Windows
https://git-for-windows.github.io/
https://git-scm.com/book/en/v2
Git - Commands
CLONE – an existing repository
Git – Basic Commands
Checking status of files
$ Git status
Output On branch master nothing to commit, working directory clean
Checking status of files – Untracked files – (Add a file to working dir.)
$ Git status
Output
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
New Text Document.txt
nothing added to commit but untracked files present (use "git add" to track)
Tracking files – Add
$ git add <filename>
Output On branch master nothing to commit, working directory clean
Checking status of files – After adding file
$ git status
Output
On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage)
new file: <File Name>
Staging Modified Files (Modify a file)
If you change a previously tracked file called “CONTRIBUTING.md” and then run
your git status command again, you get something that looks like this:
$ git status
Output
Changes not staged for commit: (use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory
You have to add them again
$ git add CONTRIBUTING.md
Git – Basic Commands
Git – Basic Commands
Commit files
$ git commit
$ git commit –m
Skipping the staging area
$ git commit -a –m [applicable for tracked files]
Removing File- You have to remove it from tracked files(staging area) and then commit
$ git rm <<File name>>
$ git commit
Commit History -
$ git logs
Unstaging staged file
$ git reset HEAD CONTRIBUTING.md
Unmodifying a Modified File
$ git checkout -- CONTRIBUTING.md
Git - Branching
Git - Merging
Git – Working with remote
$ git remote –v
$ git remote add origin (remote name) http://github.com/somrepo.git
$ git pull origin (remote) master (branch) {git fetch and merge}
$ git push origin (remote) master (branch)
Git - Ignoring files
.gitignore
Git - On the server
Git - IDE Plugins
Git – Online Exercises
• http://pcottle.github.io/learngitBranching/
• https://try.github.io/levels/1/challenges/1
• https://www.codeschool.com/courses/git-real
Git - Further Reading
• PRO GIT (Beginner)
https://git-scm.com/book/en/v2
• Git Pocket Guide (Advanced)
http://www.amazon.in/Git-Pocket-Guide-Richard-Silverman/dp/935110236X
Git - Always Remember – git never forgets!
There are a lot of great things about Git, but one feature that can cause issues is the fact that a git clone
downloads the entire history of the project, including every version of every file.
This is fine if the whole thing is source code, because Git is highly optimized to compress that data
efficiently.
However, if someone at any point in the history of your project added a single huge file, every clone for all
time will be forced to download that large file, even if it was removed from the project in the very next
commit. Because it’s reachable from the history, it will always be there.
https://rtyley.github.io/bfg-repo-cleaner/
https://git-scm.com/book/en/v2

More Related Content

What's hot

Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
 
Learning git
Learning gitLearning git
Learning git
Sid Anand
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
Thomas Rausch
 
Github basics
Github basicsGithub basics
Github basics
Radoslav Georgiev
 
git and github
git and githubgit and github
git and github
Darren Oakley
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Somkiat Puisungnoen
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with github
GoogleDeveloperStude4
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
Tilton2
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
SheilaJimenezMorejon
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
Arnaud Seilles
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 

What's hot (20)

Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git basics
Git basicsGit basics
Git basics
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Learning git
Learning gitLearning git
Learning git
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Github basics
Github basicsGithub basics
Github basics
 
git and github
git and githubgit and github
git and github
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with github
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 

Viewers also liked

Machine learning – 101
Machine learning – 101Machine learning – 101
Machine learning – 101
Behzad Altaf
 
Message Oriented Middleware
Message Oriented MiddlewareMessage Oriented Middleware
Message Oriented Middleware
Behzad Altaf
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
 
Perchè Git?
Perchè Git?Perchè Git?
Perchè Git?
Mauro Ferratello
 
Git–SVN
Git–SVNGit–SVN
Sys05 uso consapevole di git - beyond the basic
Sys05   uso consapevole di git - beyond the basicSys05   uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
DotNetCampus
 
Linux Day 2015 Genova
Linux Day 2015 GenovaLinux Day 2015 Genova
Linux Day 2015 Genova
mperrando
 
GITT (part 1 of 2)
GITT (part 1 of 2)GITT (part 1 of 2)
GITT (part 1 of 2)
Ali Servet Donmez
 
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
Giovanni Buffa
 
Introduzione a git
Introduzione a gitIntroduzione a git
Introduzione a git
Marco Santonocito
 
Git best practices
Git best practicesGit best practices
Git best practices
Matteo Gavagnin
 
Introduzione a Git
Introduzione a GitIntroduzione a Git
Introduzione a Git
Stefano Valle
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
Cristian Lucchesi
 
Anatomia di un progetto open-source
Anatomia di un progetto open-sourceAnatomia di un progetto open-source
Anatomia di un progetto open-source
Bergamo Linux Users Group
 
Controllo di versione e Git
Controllo di versione e GitControllo di versione e Git
Controllo di versione e Git
Marcello Missiroli
 
Git基礎介紹
Git基礎介紹Git基礎介紹
Git基礎介紹
Max Ma
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
Nelson Tai
 

Viewers also liked (20)

Machine learning – 101
Machine learning – 101Machine learning – 101
Machine learning – 101
 
Message Oriented Middleware
Message Oriented MiddlewareMessage Oriented Middleware
Message Oriented Middleware
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Perchè Git?
Perchè Git?Perchè Git?
Perchè Git?
 
Git–SVN
Git–SVNGit–SVN
Git–SVN
 
Sys05 uso consapevole di git - beyond the basic
Sys05   uso consapevole di git - beyond the basicSys05   uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
 
Linux Day 2015 Genova
Linux Day 2015 GenovaLinux Day 2015 Genova
Linux Day 2015 Genova
 
GITT (part 1 of 2)
GITT (part 1 of 2)GITT (part 1 of 2)
GITT (part 1 of 2)
 
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
 
GitSlides
GitSlidesGitSlides
GitSlides
 
Introduzione a git
Introduzione a gitIntroduzione a git
Introduzione a git
 
Git best practices
Git best practicesGit best practices
Git best practices
 
Introduzione a Git
Introduzione a GitIntroduzione a Git
Introduzione a Git
 
Git e Git Flow
Git e Git Flow Git e Git Flow
Git e Git Flow
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Anatomia di un progetto open-source
Anatomia di un progetto open-sourceAnatomia di un progetto open-source
Anatomia di un progetto open-source
 
Controllo di versione e Git
Controllo di versione e GitControllo di versione e Git
Controllo di versione e Git
 
Git基礎介紹
Git基礎介紹Git基礎介紹
Git基礎介紹
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 

Similar to Git - An Introduction

Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)
Ashok Kumar
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
Rifauddin Tsalitsy
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
Supachai Vorrasing
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Loading...git
Loading...gitLoading...git
Loading...git
Rafael García
 
Git basics
Git basicsGit basics
Git basics
Malihe Asemani
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
Serhii Kartashov
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
Geoff Hoffman
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basics
Chris Bohatka
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
atishgoswami
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
 
Git
GitGit
Git: be social
Git: be socialGit: be social
Git: be social
Geronimo Orozco
 
Git
GitGit
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
vimukthirandika
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
gdsc13
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
Things Lab
 

Similar to Git - An Introduction (20)

Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
 
Git introduction
Git introductionGit introduction
Git introduction
 
Loading...git
Loading...gitLoading...git
Loading...git
 
Git basics
Git basicsGit basics
Git basics
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basics
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
 
Git
GitGit
Git
 
Git: be social
Git: be socialGit: be social
Git: be social
 
Git
GitGit
Git
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 

Recently uploaded

Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
shivamt017
 
GT degree offer diploma Transcript
GT degree offer diploma TranscriptGT degree offer diploma Transcript
GT degree offer diploma Transcript
attueb
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
sheqnetworkmarketing
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
908dutch
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
SSTech System
 
UMiami degree offer diploma Transcript
UMiami degree offer diploma TranscriptUMiami degree offer diploma Transcript
UMiami degree offer diploma Transcript
attueb
 
Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
Task Tracker
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
ssuser2b426d1
 
Artificial intelligence in customer services or chatbots
Artificial intelligence  in customer services or chatbotsArtificial intelligence  in customer services or chatbots
Artificial intelligence in customer services or chatbots
kayash1656
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
Srinivas Dukka
 
The Ultimate Guide to Phone Spy Apps: Everything You Need to Know
The Ultimate Guide to Phone Spy Apps: Everything You Need to KnowThe Ultimate Guide to Phone Spy Apps: Everything You Need to Know
The Ultimate Guide to Phone Spy Apps: Everything You Need to Know
onemonitarsoftware
 
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdfBuilding infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
mohitd6
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf
kalichargn70th171
 
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
SimonedeGijt
 
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
jealousviolet
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
jhkdigitalmarketing
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
neshakor5152
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
bhumivarma35300
 

Recently uploaded (20)

Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
 
GT degree offer diploma Transcript
GT degree offer diploma TranscriptGT degree offer diploma Transcript
GT degree offer diploma Transcript
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
 
UMiami degree offer diploma Transcript
UMiami degree offer diploma TranscriptUMiami degree offer diploma Transcript
UMiami degree offer diploma Transcript
 
Attendance Tracking From Paper To Digital
Attendance Tracking From Paper To DigitalAttendance Tracking From Paper To Digital
Attendance Tracking From Paper To Digital
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
 
Artificial intelligence in customer services or chatbots
Artificial intelligence  in customer services or chatbotsArtificial intelligence  in customer services or chatbots
Artificial intelligence in customer services or chatbots
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
 
The Ultimate Guide to Phone Spy Apps: Everything You Need to Know
The Ultimate Guide to Phone Spy Apps: Everything You Need to KnowThe Ultimate Guide to Phone Spy Apps: Everything You Need to Know
The Ultimate Guide to Phone Spy Apps: Everything You Need to Know
 
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdfBuilding infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
Building infrastructure with code_ A deep dive into CDK for IaC in Java.pdf
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf
 
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
 
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
VVIP Girls Call Mumbai 9910780858 Provide Best And Top Girl Service And No1 i...
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
 

Git - An Introduction

  • 1. - Behzad Altaf A 2-3-5-7-11-13…-r
  • 2. Agenda • Version Control • What • Why • Types • How • Git • History • Fundamentals • Basic Commands • Branching • Working with remote • Further reading/ references • Tips
  • 4. Version Control • In computer software engineering, revision control is any kind of practice that tracks and provides control over changes to source code. • Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. https://en.wikipedia.org/wiki/Version_control
  • 6. Version Control – Why? http://www.webdesignerdepot.com/2009/03/intro-to-git-for-web-designers/
  • 8. Version Control - Local https://git-scm.com/book/en/v2
  • 9. Version Control - Centralized https://git-scm.com/book/en/v2
  • 10. Version Control - Distributed https://git-scm.com/book/en/v2
  • 11. Version Control - options
  • 13. What is git? Distributed Performant Reliable
  • 14. Git – History • The Linux kernel is an open source software project of fairly large scope. For most of the lifetime of the Linux kernel maintenance (1991–2002), changes to the software were passed around as patches and archived files. In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper. • In 2005, the relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper. https://git-scm.com/book/en/v2
  • 15. Git - Data Storage Storing data as changes to a base version of each file. Storing data as snapshots of the project over time. https://git-scm.com/book/en/v2
  • 16. Git - The Sections https://git-scm.com/book/en/v2
  • 17. Git - The Sections http://www.slideshare.net/nullstein/git-usage-patterns
  • 19. GIT Installation git for Windows https://git-for-windows.github.io/ https://git-scm.com/book/en/v2
  • 20. Git - Commands CLONE – an existing repository
  • 21. Git – Basic Commands Checking status of files $ Git status Output On branch master nothing to commit, working directory clean Checking status of files – Untracked files – (Add a file to working dir.) $ Git status Output Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) New Text Document.txt nothing added to commit but untracked files present (use "git add" to track)
  • 22. Tracking files – Add $ git add <filename> Output On branch master nothing to commit, working directory clean Checking status of files – After adding file $ git status Output On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: <File Name> Staging Modified Files (Modify a file) If you change a previously tracked file called “CONTRIBUTING.md” and then run your git status command again, you get something that looks like this: $ git status Output Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory You have to add them again $ git add CONTRIBUTING.md Git – Basic Commands
  • 23. Git – Basic Commands Commit files $ git commit $ git commit –m Skipping the staging area $ git commit -a –m [applicable for tracked files] Removing File- You have to remove it from tracked files(staging area) and then commit $ git rm <<File name>> $ git commit Commit History - $ git logs Unstaging staged file $ git reset HEAD CONTRIBUTING.md Unmodifying a Modified File $ git checkout -- CONTRIBUTING.md
  • 26. Git – Working with remote $ git remote –v $ git remote add origin (remote name) http://github.com/somrepo.git $ git pull origin (remote) master (branch) {git fetch and merge} $ git push origin (remote) master (branch)
  • 27. Git - Ignoring files .gitignore
  • 28. Git - On the server
  • 29. Git - IDE Plugins
  • 30. Git – Online Exercises • http://pcottle.github.io/learngitBranching/ • https://try.github.io/levels/1/challenges/1 • https://www.codeschool.com/courses/git-real
  • 31. Git - Further Reading • PRO GIT (Beginner) https://git-scm.com/book/en/v2 • Git Pocket Guide (Advanced) http://www.amazon.in/Git-Pocket-Guide-Richard-Silverman/dp/935110236X
  • 32. Git - Always Remember – git never forgets! There are a lot of great things about Git, but one feature that can cause issues is the fact that a git clone downloads the entire history of the project, including every version of every file. This is fine if the whole thing is source code, because Git is highly optimized to compress that data efficiently. However, if someone at any point in the history of your project added a single huge file, every clone for all time will be forced to download that large file, even if it was removed from the project in the very next commit. Because it’s reachable from the history, it will always be there. https://rtyley.github.io/bfg-repo-cleaner/ https://git-scm.com/book/en/v2