SlideShare a Scribd company logo
1 of 20
Version Control & GIT
Floating lesson
Yoram Michaeli 21-July-2016
Source-it
•Present what is version control and why
we use it
•Present what is GIT, its basic concept and
what must we know about it in order to
use it
•Present basic GIT flows in practice
Presentation Goals
Source-it
Version Control
Source-it
What is version control?
• Version Control (VC) also known as source control or
revision control
• Version control – management of changes in
documents, computer programs or other collection of
information files
• Revision control is any kind of practice that tracks and
provides control over changes to source code
• Version Control Systems (VCS) – GIT, SVN, ClearCase,
CVS, Perforce
Source-it
Why do we need version control?
• Collaboration
• Work with different versions of the code
• Control the different versions of the software
• Meet legal, security and management requirements
• Track changes of the code and configuration files
Source-it
GIT
Source-it
What is GIT?
• GIT – Free of charge Distributed Version Control System
(DVCS)
• GIT has been created in 2005 by Linus Torvalds for the
development of the Linux Kernel
• Every GIT directory on every computer is a full
repository with complete history and full version-
tracking capabilities
• Every GIT directory is independent of network access
or central server
Source-it
GIT basics
Source-it
GIT basic terms
Synchronization actions (network-related actions)
• Clone – making a copy of a remote repository onto a local directory
• Fetch – synchronize the local repository from the remote repository
• Pull – update the local working directory for the current branch from the remote matching
branch
• Push – update the remote branch with the latest version of the current branch and/or tags on
the local repository
Local work terms (locally without network)
• Add – stage files to be tracked by GIT
• Commit – save local changes into the local repository
• Branch – a repository version pointing to some path in the repository structure
• Checkout – update the local working directory to a certain version of the repository
• Merge – sync. a certain branch of the local repository from another branch or tags or version
Source-it
GIT in practice
Source-it
Common GIT workflows
• Clone a repository
• Synchronize the local repository
• Commit a change
• Create a new branch
• Switch between branches
• Merge from branch to branch
• Pull request
Source-it
Clone a repository
From command line:
git clone git@github.com:yorammi/source-it.git
Source-it
Clone a repository
In Eclipse:
Source-it
Synchronize the local repository
From command line:
git fetch origin
git pull origin master
git push origin master
Source-it
Commit a change
From command line:
git add –all
git commit –m ”source-it change”
Source-it
Create a new branch
From command line:
git branch source-it
git checkout source-it
Which is equivalent to:
git checkout –b source-it
Source-it
Switch between branches
From command line:
git checkout master
git checkout source-it
Source-it
Merge from branch to branch
From command line:
git checkout master
git merge source-it
Source-it
Pull request
• Each GIT hosting service may handle pull request differently
• Pull requests are best for code-review and collaboration
Source-it
What’s next?
Source-it

More Related Content

What's hot

Presentation on GIT at Eminence
Presentation on GIT at EminencePresentation on GIT at Eminence
Presentation on GIT at Eminence
Farhan Ar Rafi
 

What's hot (18)

Evolution of GIT - Linus Torvald's magic
Evolution of GIT - Linus Torvald's magicEvolution of GIT - Linus Torvald's magic
Evolution of GIT - Linus Torvald's magic
 
Introduction to Versioning (VCS) for Developers
Introduction to Versioning (VCS) for DevelopersIntroduction to Versioning (VCS) for Developers
Introduction to Versioning (VCS) for Developers
 
2016 NIWeek - TI’s Continuous Delivery Machine for Accelerated Application De...
2016 NIWeek - TI’s Continuous Delivery Machine for Accelerated Application De...2016 NIWeek - TI’s Continuous Delivery Machine for Accelerated Application De...
2016 NIWeek - TI’s Continuous Delivery Machine for Accelerated Application De...
 
Streams in Parallel Development by Sven Erik Knop
Streams in Parallel Development by Sven Erik KnopStreams in Parallel Development by Sven Erik Knop
Streams in Parallel Development by Sven Erik Knop
 
Version Control in TFS 2013: GIT - 2013 Application Lifecycle Management Event
Version Control in TFS 2013: GIT - 2013 Application Lifecycle Management EventVersion Control in TFS 2013: GIT - 2013 Application Lifecycle Management Event
Version Control in TFS 2013: GIT - 2013 Application Lifecycle Management Event
 
The eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with MicroservicesThe eBay-Way Meetup IL - CI/CD with Microservices
The eBay-Way Meetup IL - CI/CD with Microservices
 
Presentation on GIT at Eminence
Presentation on GIT at EminencePresentation on GIT at Eminence
Presentation on GIT at Eminence
 
Configuration management your infrastructure with open suse
Configuration management your infrastructure with open suseConfiguration management your infrastructure with open suse
Configuration management your infrastructure with open suse
 
Understanding GIT / Bitbucket training
Understanding GIT / Bitbucket training Understanding GIT / Bitbucket training
Understanding GIT / Bitbucket training
 
The State of Security Enhanced Linux - FOSS.IN/2007
The State of Security Enhanced Linux - FOSS.IN/2007The State of Security Enhanced Linux - FOSS.IN/2007
The State of Security Enhanced Linux - FOSS.IN/2007
 
Source Code management System
Source Code management SystemSource Code management System
Source Code management System
 
Case management applications with BPM
Case management applications with BPMCase management applications with BPM
Case management applications with BPM
 
What's new in JBoss BPM Suite 6.1
What's new in JBoss BPM Suite 6.1What's new in JBoss BPM Suite 6.1
What's new in JBoss BPM Suite 6.1
 
Building responsive and flexible applications with BPM
Building responsive and flexible applications with BPMBuilding responsive and flexible applications with BPM
Building responsive and flexible applications with BPM
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Building advanced case-driven applications
Building advanced case-driven applicationsBuilding advanced case-driven applications
Building advanced case-driven applications
 
Flowable What´s coming next?
Flowable What´s coming next?Flowable What´s coming next?
Flowable What´s coming next?
 
Version control
Version controlVersion control
Version control
 

Similar to Source-it Version-contol & GIT - floating-lesson

Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
Robert Lee-Cann
 

Similar to Source-it Version-contol & GIT - floating-lesson (20)

git (1).pptx
git (1).pptxgit (1).pptx
git (1).pptx
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git SVN Migrate Reasons
Git SVN Migrate ReasonsGit SVN Migrate Reasons
Git SVN Migrate Reasons
 
Git
GitGit
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 theory
Git   theoryGit   theory
Git theory
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git Educated About Git - 20 Essential Commands
Git Educated About Git - 20 Essential CommandsGit Educated About Git - 20 Essential Commands
Git Educated About Git - 20 Essential Commands
 
Source control
Source controlSource control
Source control
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Github
GithubGithub
Github
 
Git Basics
Git BasicsGit Basics
Git Basics
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
GIT.pptx
GIT.pptxGIT.pptx
GIT.pptx
 
Git and GitHub (1).pptx
Git and GitHub (1).pptxGit and GitHub (1).pptx
Git and GitHub (1).pptx
 
Git an introductino
Git an introductinoGit an introductino
Git an introductino
 
Git
GitGit
Git
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
 

More from Yoram Michaeli

More from Yoram Michaeli (11)

Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
 
Issue-in-the-middle-here
Issue-in-the-middle-hereIssue-in-the-middle-here
Issue-in-the-middle-here
 
Continuous integration introduction
Continuous integration introductionContinuous integration introduction
Continuous integration introduction
 
The Jenkins Pipeline Force Awakens - Jenkins User Conference Tel-Aviv 2018
The Jenkins Pipeline Force Awakens - Jenkins User Conference Tel-Aviv 2018The Jenkins Pipeline Force Awakens - Jenkins User Conference Tel-Aviv 2018
The Jenkins Pipeline Force Awakens - Jenkins User Conference Tel-Aviv 2018
 
הרכב והעתיד The Car and the future
הרכב והעתיד The Car and the futureהרכב והעתיד The Car and the future
הרכב והעתיד The Car and the future
 
The Jenkins pipeline force awakens
The Jenkins pipeline force awakensThe Jenkins pipeline force awakens
The Jenkins pipeline force awakens
 
The Jenkins Force Awaken Again @ JAM #6 meetup
 The Jenkins Force Awaken Again @ JAM #6 meetup The Jenkins Force Awaken Again @ JAM #6 meetup
The Jenkins Force Awaken Again @ JAM #6 meetup
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibase
 
Choosing Git hosting service
Choosing Git hosting serviceChoosing Git hosting service
Choosing Git hosting service
 
Lets git to it
Lets git to itLets git to it
Lets git to it
 
Now i git it!!!
Now i git it!!!Now i git it!!!
Now i git it!!!
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 

Source-it Version-contol & GIT - floating-lesson

  • 1. Version Control & GIT Floating lesson Yoram Michaeli 21-July-2016 Source-it
  • 2. •Present what is version control and why we use it •Present what is GIT, its basic concept and what must we know about it in order to use it •Present basic GIT flows in practice Presentation Goals Source-it
  • 4. What is version control? • Version Control (VC) also known as source control or revision control • Version control – management of changes in documents, computer programs or other collection of information files • Revision control is any kind of practice that tracks and provides control over changes to source code • Version Control Systems (VCS) – GIT, SVN, ClearCase, CVS, Perforce Source-it
  • 5. Why do we need version control? • Collaboration • Work with different versions of the code • Control the different versions of the software • Meet legal, security and management requirements • Track changes of the code and configuration files Source-it
  • 7. What is GIT? • GIT – Free of charge Distributed Version Control System (DVCS) • GIT has been created in 2005 by Linus Torvalds for the development of the Linux Kernel • Every GIT directory on every computer is a full repository with complete history and full version- tracking capabilities • Every GIT directory is independent of network access or central server Source-it
  • 9. GIT basic terms Synchronization actions (network-related actions) • Clone – making a copy of a remote repository onto a local directory • Fetch – synchronize the local repository from the remote repository • Pull – update the local working directory for the current branch from the remote matching branch • Push – update the remote branch with the latest version of the current branch and/or tags on the local repository Local work terms (locally without network) • Add – stage files to be tracked by GIT • Commit – save local changes into the local repository • Branch – a repository version pointing to some path in the repository structure • Checkout – update the local working directory to a certain version of the repository • Merge – sync. a certain branch of the local repository from another branch or tags or version Source-it
  • 11. Common GIT workflows • Clone a repository • Synchronize the local repository • Commit a change • Create a new branch • Switch between branches • Merge from branch to branch • Pull request Source-it
  • 12. Clone a repository From command line: git clone git@github.com:yorammi/source-it.git Source-it
  • 13. Clone a repository In Eclipse: Source-it
  • 14. Synchronize the local repository From command line: git fetch origin git pull origin master git push origin master Source-it
  • 15. Commit a change From command line: git add –all git commit –m ”source-it change” Source-it
  • 16. Create a new branch From command line: git branch source-it git checkout source-it Which is equivalent to: git checkout –b source-it Source-it
  • 17. Switch between branches From command line: git checkout master git checkout source-it Source-it
  • 18. Merge from branch to branch From command line: git checkout master git merge source-it Source-it
  • 19. Pull request • Each GIT hosting service may handle pull request differently • Pull requests are best for code-review and collaboration Source-it