SlideShare a Scribd company logo
1 of 23
Getting Started with Git 
a primer for svn and tfs users 
Noam Kfir | Sela Group | 2014
Agenda 
 VCS Overview 
 Git in a Nutshell 
 Q&A
Version Control Systems (VCS) 
•Backup code and other resources 
• Restore previous states Reversibility 
•Share with the team 
•Make available to automated processes Concurrency 
•Comments, tags and other metadata 
•Communication Annotation
Approaches to Version Control 
Centralized 
One Authority 
Connected 
File System* 
Distributed 
Arbitrary Authority 
Disconnected 
Database
Basic Product Comparison 
TFS 
Workspace 
Changesets 
One stage: 
check in 
SVN 
Working Copy 
Changesets 
One stage: 
commit 
Git 
Full Repository 
Snapshots 
Two stages: 
commit + push
Commits Are Local 
 Modify only the local repository index 
 Do not modify the remote repository 
 Every commit: 
 Creates a snapshot 
 Creates a new revision 
 Receives a new unique SHA-1 ref identifier 
 Supports completely disconnected workflows
More Advantages of Local Commits 
 Can accumulate multiple commits before integrating 
 Easier to group related commits 
 History can be cleaned up before pushing changes 
 More control over local environment
Snapshots over Deltas 
Faster 
operations 
Complex 
merges 
Rewriting 
history 
Advanced 
workflows
Installing Git on Windows 
 http://git-scm.com 
 Chocolatey: cinst git 
 TortoiseGit 
 GitExtensions 
 Visual Studio Team Explorer 
 And many more…
Configuration 
 Configuration Cascade 
 local  per repository 
 global  per user 
 system  per machine 
 Most common configurations are global 
 Some basic settings 
 user.name 
 user.email 
 core.autocrlf
Excluding Files and Folders 
 Avoid storing user-specific and temporary files in the remote repository, 
by using the .gitignore file 
 The .gitignore file supports wildcards 
 Ignored files do not appear in the git status command output
Getting Started 
 git init repository-name Create a new repository 
 git remote add name url Link the local repository to a remote repository 
 git clone repository-url Copy and link an existing remote repository
Bare Repositories 
 No working folder 
 Contents nearly identical to non-bare .git folder 
 By convention, .git extension appended to bare repository name 
 Created with git init --bare or git clone repository --bare 
 Central repositories are almost always bare 
 Local repositories are almost never bare
Branches 
 A branch in Git points to a commit 
 It is not a container or a folder that stores files 
 git checkout [-b] branch Switch to the specified branch [after creating it] 
 git branch List and manage branches
Revision Selection and refs 
 Git uses special files to store information about its history 
 Every commit has a SHA-1 identifier – called the ref 
 You can refer to any commit, including remote commits, using the ref or a shorter ref 
 The revision selection syntax is very flexible. A few examples: 
 HEAD~1 
 HEAD^^ 
 master..branch 
 a1b2c3d
The Stage 
 Files ready to be committed are “on the stage” 
 Supports precise atomic commits – files and individual changes 
 git add files Stage files and/or changes to be committed 
 git status See an overview of the local changes 
 git commit -m message Create a commit with the staged changes 
 Some commands use the --cached parameter to refer to the stage
Working with Remote Repositories 
 git pull repository Fetch and merge 
 git fetch repository Fetch the latest version from the remote repository 
 git merge source-branch Merge the changes from the specified branch 
 git push repository Send the local commits to the remote repository
The Edit/Stage/Commit Sequence 
 git pull 
 (modify files) 
 git add file_or_folder 
 git status 
 git commit –m "Modified something or other” 
 git push
Merge Without Fear 
 Merging is central to git 
 Different types of merge strategies 
 Usually selected automatically 
 Can be specified manually 
 pull = fetch + merge
Merge vs. Rebase 
git merge 
Copy 
Adds to history 
Usually safe 
Good for traceability 
Leaves messy history 
git rebase 
Move 
Rewrites history 
Can be dangerous 
Good for cleanup 
Makes history more linear
Rich Featureset 
Stash Log Branches refspec 
Merge 
Algorithms 
Aliases grep 
Tags Hooks .gitignore cherry-pick reflog reset revert 
Patches Remotes 
diff and 
difftool 
Hosting 
Tracking 
Branches 
Bare 
Repositories 
Conflict 
Resolution 
SSH Line Endings bisect GC Submodules Forks …
Summary 
 Git is a very rich distributed version control system 
 Its distributed snapshot nature makes it extremely flexible and suitable 
for many different types of work environments 
 From individual programmers to small co-located teams to massive distributed teams 
 From open source projects to corporations 
 Git supported most of the workflows supported by TFS and SVN, 
but also offers additional benefits
Thank You!

More Related Content

What's hot

Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewJim Bethancourt
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 
How we use Bitbucket to build Bitbucket
How we use Bitbucket to build BitbucketHow we use Bitbucket to build Bitbucket
How we use Bitbucket to build BitbucketShunsuke (Sean) Osawa
 
Software Versioning with Bitbucket and Eclipse
Software Versioning with Bitbucket and EclipseSoftware Versioning with Bitbucket and Eclipse
Software Versioning with Bitbucket and EclipseHüseyin Ergin
 
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with MylynIntegrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with MylynSascha Scholz
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011thkoch
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerLuca Milanesio
 
Evolution of Version Control In Open Source
Evolution of Version Control In Open SourceEvolution of Version Control In Open Source
Evolution of Version Control In Open SourceChris Aniszczyk
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHubMichael Redlich
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshopCisco DevNet
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincitOy
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productiveKarsten Dambekalns
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial IIJim Yeh
 

What's hot (20)

Introduction git
Introduction gitIntroduction git
Introduction git
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature Overview
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
How we use Bitbucket to build Bitbucket
How we use Bitbucket to build BitbucketHow we use Bitbucket to build Bitbucket
How we use Bitbucket to build Bitbucket
 
Intro to Gitflow
Intro to GitflowIntro to Gitflow
Intro to Gitflow
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Software Versioning with Bitbucket and Eclipse
Software Versioning with Bitbucket and EclipseSoftware Versioning with Bitbucket and Eclipse
Software Versioning with Bitbucket and Eclipse
 
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with MylynIntegrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
 
Git & GitHub N00bs
Git & GitHub N00bsGit & GitHub N00bs
Git & GitHub N00bs
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and Docker
 
Evolution of Version Control In Open Source
Evolution of Version Control In Open SourceEvolution of Version Control In Open Source
Evolution of Version Control In Open Source
 
Git basics
Git basicsGit basics
Git basics
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHub
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 

Viewers also liked

Svn vs mercurial vs github
Svn  vs  mercurial vs  githubSvn  vs  mercurial vs  github
Svn vs mercurial vs githubVinoth Kannan
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of GitDivineOmega
 
Moving to Git
Moving to GitMoving to Git
Moving to GitTim Moore
 
Training: Day Two - Eclipse, Git, Maven
Training: Day Two - Eclipse, Git, MavenTraining: Day Two - Eclipse, Git, Maven
Training: Day Two - Eclipse, Git, MavenArtur Ventura
 
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and MygetWhy we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and MygetDennis Doomen
 
From svn to git
From svn to gitFrom svn to git
From svn to gitNehal Shah
 
Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started PresentationNap Ramirez
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVNneuros
 
Taking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and GitTaking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and GitAlexander Vanwynsberghe
 

Viewers also liked (16)

Svn vs mercurial vs github
Svn  vs  mercurial vs  githubSvn  vs  mercurial vs  github
Svn vs mercurial vs github
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Moving to Git
Moving to GitMoving to Git
Moving to Git
 
Training: Day Two - Eclipse, Git, Maven
Training: Day Two - Eclipse, Git, MavenTraining: Day Two - Eclipse, Git, Maven
Training: Day Two - Eclipse, Git, Maven
 
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and MygetWhy we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
 
Lets git to it
Lets git to itLets git to it
Lets git to it
 
From svn to git
From svn to gitFrom svn to git
From svn to git
 
Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git vs SVN
Git vs SVNGit vs SVN
Git vs SVN
 
Taking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and GitTaking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and Git
 

Similar to Getting Started with Git: A Primer for SVN and TFS Users

Version control with GIT
Version control with GITVersion control with GIT
Version control with GITZeeshan Khan
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Intro to Git and Github
Intro to Git and GithubIntro to Git and Github
Intro to Git and GithubAndrew Babiec
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践Terry Wang
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGandhi Ramu
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Git journey from mars to neon EclipseCon North America - 2016-03-08
Git journey from mars to neon   EclipseCon North America - 2016-03-08Git journey from mars to neon   EclipseCon North America - 2016-03-08
Git journey from mars to neon EclipseCon North America - 2016-03-08msohn
 

Similar to Getting Started with Git: A Primer for SVN and TFS Users (20)

Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Intro to Git and Github
Intro to Git and GithubIntro to Git and Github
Intro to Git and Github
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Roslyn on GitHub
Roslyn on GitHubRoslyn on GitHub
Roslyn on GitHub
 
Git and Github - A primer
Git and Github - A primerGit and Github - A primer
Git and Github - A primer
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git 101
Git 101Git 101
Git 101
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 
github_gyan.pptx
github_gyan.pptxgithub_gyan.pptx
github_gyan.pptx
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git journey from mars to neon EclipseCon North America - 2016-03-08
Git journey from mars to neon   EclipseCon North America - 2016-03-08Git journey from mars to neon   EclipseCon North America - 2016-03-08
Git journey from mars to neon EclipseCon North America - 2016-03-08
 
Git 101
Git 101Git 101
Git 101
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
 

More from Noam Kfir

Agile Mind Games and the Art of Self-Delusion
Agile Mind Games and the Art of Self-DelusionAgile Mind Games and the Art of Self-Delusion
Agile Mind Games and the Art of Self-DelusionNoam Kfir
 
Testers and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesTesters and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesNoam Kfir
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleNoam Kfir
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript ModulesNoam Kfir
 
There Is No JavaScript
There Is No JavaScriptThere Is No JavaScript
There Is No JavaScriptNoam Kfir
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Noam Kfir
 
Maximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyMaximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyNoam Kfir
 
Web components
Web componentsWeb components
Web componentsNoam Kfir
 
HTML5 and the Evolution of the Web
HTML5 and the Evolution of the WebHTML5 and the Evolution of the Web
HTML5 and the Evolution of the WebNoam Kfir
 
Git Workflows
Git WorkflowsGit Workflows
Git WorkflowsNoam Kfir
 
Building Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaBuilding Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaNoam Kfir
 
Telerik Platform
Telerik PlatformTelerik Platform
Telerik PlatformNoam Kfir
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceNoam Kfir
 
Drawing in HTML5 Open House
Drawing in HTML5 Open HouseDrawing in HTML5 Open House
Drawing in HTML5 Open HouseNoam Kfir
 

More from Noam Kfir (16)

Agile Mind Games and the Art of Self-Delusion
Agile Mind Games and the Art of Self-DelusionAgile Mind Games and the Art of Self-Delusion
Agile Mind Games and the Art of Self-Delusion
 
Testers and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesTesters and Coders - Blurring the Lines
Testers and Coders - Blurring the Lines
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black Hole
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
 
There Is No JavaScript
There Is No JavaScriptThere Is No JavaScript
There Is No JavaScript
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
 
Meteor
MeteorMeteor
Meteor
 
Clean code
Clean codeClean code
Clean code
 
Maximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyMaximizing UI Automation – A Case Study
Maximizing UI Automation – A Case Study
 
Web components
Web componentsWeb components
Web components
 
HTML5 and the Evolution of the Web
HTML5 and the Evolution of the WebHTML5 and the Evolution of the Web
HTML5 and the Evolution of the Web
 
Git Workflows
Git WorkflowsGit Workflows
Git Workflows
 
Building Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaBuilding Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using Cordova
 
Telerik Platform
Telerik PlatformTelerik Platform
Telerik Platform
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Drawing in HTML5 Open House
Drawing in HTML5 Open HouseDrawing in HTML5 Open House
Drawing in HTML5 Open House
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Getting Started with Git: A Primer for SVN and TFS Users

  • 1. Getting Started with Git a primer for svn and tfs users Noam Kfir | Sela Group | 2014
  • 2. Agenda  VCS Overview  Git in a Nutshell  Q&A
  • 3. Version Control Systems (VCS) •Backup code and other resources • Restore previous states Reversibility •Share with the team •Make available to automated processes Concurrency •Comments, tags and other metadata •Communication Annotation
  • 4. Approaches to Version Control Centralized One Authority Connected File System* Distributed Arbitrary Authority Disconnected Database
  • 5. Basic Product Comparison TFS Workspace Changesets One stage: check in SVN Working Copy Changesets One stage: commit Git Full Repository Snapshots Two stages: commit + push
  • 6. Commits Are Local  Modify only the local repository index  Do not modify the remote repository  Every commit:  Creates a snapshot  Creates a new revision  Receives a new unique SHA-1 ref identifier  Supports completely disconnected workflows
  • 7. More Advantages of Local Commits  Can accumulate multiple commits before integrating  Easier to group related commits  History can be cleaned up before pushing changes  More control over local environment
  • 8. Snapshots over Deltas Faster operations Complex merges Rewriting history Advanced workflows
  • 9. Installing Git on Windows  http://git-scm.com  Chocolatey: cinst git  TortoiseGit  GitExtensions  Visual Studio Team Explorer  And many more…
  • 10. Configuration  Configuration Cascade  local  per repository  global  per user  system  per machine  Most common configurations are global  Some basic settings  user.name  user.email  core.autocrlf
  • 11. Excluding Files and Folders  Avoid storing user-specific and temporary files in the remote repository, by using the .gitignore file  The .gitignore file supports wildcards  Ignored files do not appear in the git status command output
  • 12. Getting Started  git init repository-name Create a new repository  git remote add name url Link the local repository to a remote repository  git clone repository-url Copy and link an existing remote repository
  • 13. Bare Repositories  No working folder  Contents nearly identical to non-bare .git folder  By convention, .git extension appended to bare repository name  Created with git init --bare or git clone repository --bare  Central repositories are almost always bare  Local repositories are almost never bare
  • 14. Branches  A branch in Git points to a commit  It is not a container or a folder that stores files  git checkout [-b] branch Switch to the specified branch [after creating it]  git branch List and manage branches
  • 15. Revision Selection and refs  Git uses special files to store information about its history  Every commit has a SHA-1 identifier – called the ref  You can refer to any commit, including remote commits, using the ref or a shorter ref  The revision selection syntax is very flexible. A few examples:  HEAD~1  HEAD^^  master..branch  a1b2c3d
  • 16. The Stage  Files ready to be committed are “on the stage”  Supports precise atomic commits – files and individual changes  git add files Stage files and/or changes to be committed  git status See an overview of the local changes  git commit -m message Create a commit with the staged changes  Some commands use the --cached parameter to refer to the stage
  • 17. Working with Remote Repositories  git pull repository Fetch and merge  git fetch repository Fetch the latest version from the remote repository  git merge source-branch Merge the changes from the specified branch  git push repository Send the local commits to the remote repository
  • 18. The Edit/Stage/Commit Sequence  git pull  (modify files)  git add file_or_folder  git status  git commit –m "Modified something or other”  git push
  • 19. Merge Without Fear  Merging is central to git  Different types of merge strategies  Usually selected automatically  Can be specified manually  pull = fetch + merge
  • 20. Merge vs. Rebase git merge Copy Adds to history Usually safe Good for traceability Leaves messy history git rebase Move Rewrites history Can be dangerous Good for cleanup Makes history more linear
  • 21. Rich Featureset Stash Log Branches refspec Merge Algorithms Aliases grep Tags Hooks .gitignore cherry-pick reflog reset revert Patches Remotes diff and difftool Hosting Tracking Branches Bare Repositories Conflict Resolution SSH Line Endings bisect GC Submodules Forks …
  • 22. Summary  Git is a very rich distributed version control system  Its distributed snapshot nature makes it extremely flexible and suitable for many different types of work environments  From individual programmers to small co-located teams to massive distributed teams  From open source projects to corporations  Git supported most of the workflows supported by TFS and SVN, but also offers additional benefits