SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Getting started with
GIT
Content
● Why do we need git?
● VCS
● CVCS,DVCS
● History of git
● 3 states/areas of git
● How git is so fast
● How git stores commits?
● Git branches, merge vs re-base
● Configs in git
● Local
● Global
● System
● Git basic commands clone/init,add,commit,pull,push
● Git ignore,blame,stash,squash,diff
● Contributing to github
Why do we need Git?
C++
Why do we need Git?
Node.js
● I needed a VCS (Version control system)
Why do we need Git?
Node.js
V 1.1
Node.js
V 1.2
Node.js
V 1.3
Why do we need Git?
Git is a VCS.
Why do we need Git?
I just attended
a mooc on
programming for
noobs
Node.js
Why do we need Git?
● Problem was to keep the code in sync at some
common place.
● We needed a Centralized version control system
(CVCS) or a Distributed version control system
(DVCS)
DVCS vs CVCS
● CVCS
● Users have the latest snapshot
of code
● There is only one remote
● DVCS
● Users have the whole history of
code
● There can be multiple remotes
Bit about history
● Creator of git ?
● Till 2002 linux code and patches
were passed through archives.
● Then they started using a DVCS
called bitkeeper.
● In 2005 relationship bw bitkeeper
and linux community broke.
● On a sunny Sunday of April, linus
laid the foundation of git.
3 areas of git
● Git directory
– Committed code
● Working area
– Uncompressed latest
snapshot from git
directory
● Staging area
How git is so fast
● Snapshots not
pointers
How git stores commits?
Commit = pointer to the snapshot of staged content +
author, date, other meta data + parent commit
pointer(s) (=<0).
Git branches
● Represents an independent line of development
● A brand new set of working,staging and git directory.
● Creating new branch
● Merging branches
● Rebase
● Merge vs Rebase
● Diff in branches
Git configs
● Lets you get and set configuration variables that
control all aspects of how Git looks and operates.
● Types of configs
● Local config (.git/config)
● Global config (~/.gitconfig)
● System config (/etc/gitconfig file)
● git config -l –system/global/local
● git config --local user.email
Basic commands
● Clone
– Allows you to pull the git directory from remote to your machine.
● Status
● Add
– Add files to staging area
– Unstaging staged files (reset and rm –-cached)
● Commit
● Pull
● Pull vs fetch
● Push
And some more...
● ignore
– gitkeep
● blame
● stash
● diff
● git rm
● git log and gitk
● git checkout
● git grep
● checkout vs reset
Contributing on github
● Fork
● Commits in my remote
● Multiple remotes use case
● Pull request

Weitere ähnliche Inhalte

Was ist angesagt?

Git tech talk
Git tech talkGit tech talk
Git tech talkrazasayed
 
Gn unify git
Gn unify gitGn unify git
Gn unify gitPriyanka Nag
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitYan Vugenfirer
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleGaurav Kumar Garg
 
Git (Internals)
Git (Internals)Git (Internals)
Git (Internals)Sabin Bhatta
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to gitShilu Shrestha
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introductionrschwietzke
 
Git back on_your_feet
Git back on_your_feetGit back on_your_feet
Git back on_your_feetChristian Couder
 
DIEMS Repository Server - GitLab
DIEMS Repository Server - GitLabDIEMS Repository Server - GitLab
DIEMS Repository Server - GitLabMayur Deshmukh
 
BKK16-215 kernelci.org: beyond boot testing
BKK16-215 kernelci.org: beyond boot testingBKK16-215 kernelci.org: beyond boot testing
BKK16-215 kernelci.org: beyond boot testingLinaro
 
LSK 13.07
LSK 13.07LSK 13.07
LSK 13.07Mark Brown
 
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS
 
نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3Ali Vakilzade
 
Gitting out of trouble
Gitting out of troubleGitting out of trouble
Gitting out of troubleJon Senchyna
 
Git basics
Git basicsGit basics
Git basicsglitchdata
 

Was ist angesagt? (20)

Git & github
Git & githubGit & github
Git & github
 
Git basics
Git basicsGit basics
Git basics
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Gn unify git
Gn unify gitGn unify git
Gn unify git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
 
Git (Internals)
Git (Internals)Git (Internals)
Git (Internals)
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introduction
 
Git back on_your_feet
Git back on_your_feetGit back on_your_feet
Git back on_your_feet
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
DIEMS Repository Server - GitLab
DIEMS Repository Server - GitLabDIEMS Repository Server - GitLab
DIEMS Repository Server - GitLab
 
BKK16-215 kernelci.org: beyond boot testing
BKK16-215 kernelci.org: beyond boot testingBKK16-215 kernelci.org: beyond boot testing
BKK16-215 kernelci.org: beyond boot testing
 
LSK 13.07
LSK 13.07LSK 13.07
LSK 13.07
 
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
 
نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3
 
Gitting out of trouble
Gitting out of troubleGitting out of trouble
Gitting out of trouble
 
Git basics
Git basicsGit basics
Git basics
 
Git commands
Git commandsGit commands
Git commands
 

Ähnlich wie Git.odp 0

Git and Github - A primer
Git and Github - A primerGit and Github - A primer
Git and Github - A primerSuryakumar Sudar
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshellPranesh Vittal
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!Cory Webb
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with githubGoogleDeveloperStude4
 
GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016Peter Denev
 
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, TrivandrumAbhijitNarayan2
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial IJim Yeh
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GITAmith jayasekara
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitAmit Mathur
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to gitNguyen Van Hung
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git TutorialSage Sharp
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control systemBiga Gaber
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Git collaboration
Git collaborationGit collaboration
Git collaborationIvelin Yanev
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 

Ähnlich wie Git.odp 0 (20)

Git and Github - A primer
Git and Github - A primerGit and Github - A primer
Git and Github - A primer
 
Lets git to it
Lets git to itLets git to it
Lets git to it
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with github
 
Git
GitGit
Git
 
GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016
 
Git-Basics
Git-BasicsGit-Basics
Git-Basics
 
Git presentation
Git presentationGit presentation
Git presentation
 
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
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GIT
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
3 Git
3 Git3 Git
3 Git
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control system
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 

KĂźrzlich hochgeladen

Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 

KĂźrzlich hochgeladen (20)

Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 

Git.odp 0

  • 2. Content ● Why do we need git? ● VCS ● CVCS,DVCS ● History of git ● 3 states/areas of git ● How git is so fast ● How git stores commits? ● Git branches, merge vs re-base ● Configs in git ● Local ● Global ● System ● Git basic commands clone/init,add,commit,pull,push ● Git ignore,blame,stash,squash,diff ● Contributing to github
  • 3. Why do we need Git? C++
  • 4. Why do we need Git? Node.js
  • 5. ● I needed a VCS (Version control system)
  • 6. Why do we need Git? Node.js V 1.1 Node.js V 1.2 Node.js V 1.3
  • 7. Why do we need Git? Git is a VCS.
  • 8. Why do we need Git? I just attended a mooc on programming for noobs Node.js
  • 9. Why do we need Git? ● Problem was to keep the code in sync at some common place. ● We needed a Centralized version control system (CVCS) or a Distributed version control system (DVCS)
  • 10. DVCS vs CVCS ● CVCS ● Users have the latest snapshot of code ● There is only one remote ● DVCS ● Users have the whole history of code ● There can be multiple remotes
  • 11. Bit about history ● Creator of git ? ● Till 2002 linux code and patches were passed through archives. ● Then they started using a DVCS called bitkeeper. ● In 2005 relationship bw bitkeeper and linux community broke. ● On a sunny Sunday of April, linus laid the foundation of git.
  • 12. 3 areas of git ● Git directory – Committed code ● Working area – Uncompressed latest snapshot from git directory ● Staging area
  • 13. How git is so fast ● Snapshots not pointers
  • 14. How git stores commits? Commit = pointer to the snapshot of staged content + author, date, other meta data + parent commit pointer(s) (=<0).
  • 15. Git branches ● Represents an independent line of development ● A brand new set of working,staging and git directory. ● Creating new branch ● Merging branches ● Rebase ● Merge vs Rebase ● Diff in branches
  • 16. Git configs ● Lets you get and set configuration variables that control all aspects of how Git looks and operates. ● Types of configs ● Local config (.git/config) ● Global config (~/.gitconfig) ● System config (/etc/gitconfig file) ● git config -l –system/global/local ● git config --local user.email
  • 17. Basic commands ● Clone – Allows you to pull the git directory from remote to your machine. ● Status ● Add – Add files to staging area – Unstaging staged files (reset and rm –-cached) ● Commit ● Pull ● Pull vs fetch ● Push
  • 18. And some more... ● ignore – gitkeep ● blame ● stash ● diff ● git rm ● git log and gitk ● git checkout ● git grep ● checkout vs reset
  • 19. Contributing on github ● Fork ● Commits in my remote ● Multiple remotes use case ● Pull request