SlideShare uma empresa Scribd logo
1 de 23
Let’s Git It ! 
MAXIME LEMAITRE – 11/09/2014
Agenda 
• Back to basis 
• What is that GIT/git/Git thing ? 
• Git Concepts 
• Demos 
• Working with Git 
– GitHub 
– Git + TFS 
– Git Tools for on Visual Studio 
• Why Git ? 
• Questions 
“Git is a free and open 
source distributed version 
control system designed to 
handle everything from 
small to very large projects 
with speed and efficiency”
What’s a version control system ? 
“An application that allows you to record changes to 
your codebase in a structured and controlled fashion” 
• Makes it way easier to undo errors / roll back to earlier versions of code 
• Makes it way easier to share a codebase between developers without 
creating conflicts 
• Makes it way easier to deploy changes from development to staging or 
production environments
What is that GIT/git/Git thing? 
• Distributed Version Control System (DVCS) 
• Open source, free (GNU GPL V2) 
• Originally developed by Linus Torvalds for the development 
of the Linux Kernel in 2005 
• Used by a lot of public/private projects 
• Focus on speed and efficiency 
• Quite a unique design and therefore sometimes a bit scary 
and difficult to understand
Git Concepts 
Distributed vs. Centralized 
Centralized version control systems are based on 
the idea that there is a single central copy of your 
project somewhere (probably on a server), and 
programmers will “commit” their changes to this 
central copy. 
Distributed Version Control systems do not 
necessarily rely on a central server to store all the 
versions of a project’s files. Instead, every developer 
“clones” a copy of a repository and has 
the full history of the project on their own hard 
drive. This copy (or “clone”) has all of the metadata 
of the original.
Git Concepts 
Data Storage 
Most VCSs tend to store data as 
changes to a base version of each 
file. 
But Git stores data as snapshots of 
the project over time. Git thinks of 
its data more like a set of snapshots 
of a mini filesystem
Git Concepts 
Nearly Every Operation Is Local 
(Browse History, Commit, Branching, …). 
No need to be online. Very efficient and 
fast 
Git Has Integrity 
Everything is check-summed (SHA-1), it’s 
impossible to change the contents of any file 
or directory without Git knowing about it 
Git Generally Only Adds Data. 
Objects (blob, tree, commit, tag, ..) are 
immutable but references (branche, remote, 
…) always changes. 
Your files can reside in 3 states 
Modified means that you have changed 
the file but have not committed it to your 
database yet. 
Staged means that you have marked a 
modified file in its current version to go 
into your next commit snapshot 
Committed means that the data is safely 
stored in your local database.
Basic Git Actions 
Clone 
A clone is a copy of a repository that lives on your computer instead of on a website's server 
somewhere. With your clone you can edit the files in your preferred editor and use Git to keep 
track of your changes without having to be online. It is connected to the remote version so that 
changes can be synced between the two. 
Commit 
When committing in Git, you save your code to your local repository, which then is versioned. 
Push 
When you push your code in Git, it means that you send your changes to the repository on the 
server ; after a push, your changes will also be available for other consumers of the central 
repository. 
Fetch 
When a fetch in Git is performed, you get an overview of changes on the central repository, you 
can see a list of changes made to the code and decide if you want to get the latest version. 
Pull 
When a pull is performed, you get the latest version of the server’s repository, with all other 
changes of other team members, a merge is automatically performed, although as far as Git can 
handle the differences.
Git Demo 
try it at https://try.github.io/ 
// init a Git repository 
$ git init 
// start tracking changes made to all txt files => add them to the 
staging area 
$ git add '*.js' 
// Store our staged changes (current version) 
$ git commit -m 'Add all the js files' 
// add a remote remote repository (named origin) 
$ git remote add origin https://github.com/toto/mysuperproject.git 
// push local changes (commits) to the remote repo(branch master) 
$ git push -u origin master 
// pull down any new changes made by other people 
$ git pull origin master
Git Concepts 
Branching, Killer-feature 
• Branching is very cheap 
• Branching operations (creation, 
deletion, merge) are always local 
• You can have multiple local 
branches that can be entirely 
independent of each other 
• Git encourages a workflow that 
branches and merges often, even 
multiple times in a day 
be sure to be on master branch … 
// Switched to a new branch "fixes“ 
$ git checkout –b hotfix 
// fix code 
// commit staged changes (the fix) 
$ git commit -m ‘Fixed hard coded 
password' 
// return to master 
$ git checkout master 
// merge local hoxfix branch to master 
$ git merge hotfix 
// delete local hoxfix branch 
$ git branch -d hotfix 
// push merged fixed …
Git Concepts 
Branching workflow 
1 2 
3 4 
Standard workflow 
(Local branches)
Git Concepts 
Advanced Branching workflow
Git Concepts 
Git Hooks 
• Hooks are executables scripts that executed before or after important 
events 
– commit, push, merge, checkout, receive…. (client/server) 
• Built-in feature - no need to download anything, run locally. 
• Only limited by developer's imagination. Some example : 
– Deploy a web site 
– Check commit message 
– We want to run test suite to run automatically every time we change something 
– We want to make sure that our test coverage is high enough 
• … 
(GitHub doesn’t support fully support hooks, but provide WebHooks and 
Services)
Working with Git 
Git and/or TFS ? 
* Source Repos : Team Foundation Version Control or Git
Git for TFS users 
Git Actions TFS Command 
Clone Create Workspace and Get Latest 
Checkout Switch workspace / branch 
Commit CheckIn / Shelve 
Status Pending Changes 
Push CheckIn 
Pull Get Latest Version 
Sync CheckIn and Get Latest Version
Working with Git 
GitHub, Social Coding 
• Basically a Git repository hosting service… 
but it Provides a web-based graphical 
interface, desktop app for Mac, Linux, 
Windows 
• Adds many of its own features : issues, 
milestones, labels, wiki, API, team 
planning, graphs, … 
• Unlimited number of public repositories 
& collaborators 
• For private projects, you have to pay 
• You can clone any public repository, 
follow projects and developers, post 
comments, … 
10 Million Repositories (end of 2013) 
Most Starred, May 2014 
1 – twbs/bootstrap 
2 – jquery/jquery 
3 – joyent/node 
4 – mbostock/d3.js 
5 - angular/angular.js
Working with Git 
Git Shell/Bash 
Explorer extensions allow 
you to work direclty in any 
folder.. 
Command line is the 
standard way to use git. 
Even if there are GUI tools, 
you will have to use it at 
least once !
Working with Git 
GitHub for Windows 
Easiest way to use GitHub 
on Windows. 
https://windows.github.com/
Working with Git 
Git and Visual Studio 
• Visual Studio 2013 includes Git tools by default 
– Previously it requires an extension 
Work with Visual Studio on OSS projects !
How to contribute to an OSS Project ? 
Fork & Pull workflow 
Pull requests let you tell others about changes you've pushed 
to a GitHub repository. Once a pull request is sent, interested 
parties can review the set of changes, discuss potential 
modifications, and even push follow-up commits if necessary 
Pull requests = Commit + 
Comments + (issue ?) 
Remember to Follow project guidelines !
Why Git ? 
• Decentralized Allow developers to work offline, look in history, commit 
some changes and create branchs 
• It’s extremely fast as nearly everything is local 
• Local Branching and merging is cheap 
• Perfectly suited for Open Source projects and use by many leaders 
• Tool extremely flexible, can support a wide, wide variety of developer 
workflows 
• Huge community 
• Because of GitHub
Questions
References 
• https://try.github.io/ 
• http://nvie.com/posts/a-successful-git-branching-model/ 
• http://git-scm.com/ 
• http://johanleino.wordpress.com/2013/09/18/tfs-vs-git-or-is-it-tfs-with-git/ 
• http://www.slideshare.net/danielpcox/six3-getting-git 
• http://spring.io/blog/2010/12/21/social-coding-in-spring-projects 
• http://hashrocket.com/blog/posts/x-men-days-of-future-past-explained-in-git 
• http://gitready.com/ 
• http://stackoverflow.com/tags/git/info

Mais conteúdo relacionado

Mais procurados

TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeSascha Möllering
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairMichael Lihs
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef Michael Lihs
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Tracy Kennedy
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityDamien Coraboeuf
 
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...Puppet
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net CoreFatih Şimşek
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...Matthew Groves
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Michael Lihs
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsAll Things Open
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
Continuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CIContinuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CIalexanderkiel
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPuppet
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...All Things Open
 
JUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyJUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyCloudBees
 

Mais procurados (20)

TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love Affair
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)
 
Docker
DockerDocker
Docker
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net Core
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Continuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CIContinuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CI
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
 
JUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyJUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and Groovy
 
How Docker simplifies CI/CD
How Docker simplifies CI/CDHow Docker simplifies CI/CD
How Docker simplifies CI/CD
 
Evolution of deploy.sh
Evolution of deploy.shEvolution of deploy.sh
Evolution of deploy.sh
 

Destaque

Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Joe Kuemerle
 
Git & git flow
Git & git flowGit & git flow
Git & git flowAmo Wu
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesSuelen Carvalho
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshellNelson Tai
 
Git As A Subversion Replacement
Git As A Subversion ReplacementGit As A Subversion Replacement
Git As A Subversion ReplacementJosh Nichols
 
Git Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleGit Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleBo-Yi Wu
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to gitBo-Yi Wu
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internallySeongJae Park
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Cloud Tu
 
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom upYet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom upWen-Tien Chang
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?John Congdon
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flowCaesar Chi
 
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonEffective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonChris Aniszczyk
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily useMediacurrent
 
Advanced Git
Advanced GitAdvanced Git
Advanced Gitsegv
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An IntroductionKnoldus Inc.
 

Destaque (20)

Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
 
Git & git flow
Git & git flowGit & git flow
Git & git flow
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differences
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git As A Subversion Replacement
Git As A Subversion ReplacementGit As A Subversion Replacement
Git As A Subversion Replacement
 
Git Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleGit Flow and JavaScript Coding Style
Git Flow and JavaScript Coding Style
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
 
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom upYet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Mastering GIT
Mastering GITMastering GIT
Mastering GIT
 
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
 
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonEffective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
 

Semelhante a Mini-training: Let’s Git It!

Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxAbelPhilipJoseph
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
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 GitRobert Lee-Cann
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network EngineersJoel W. King
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab IntroductionKrunal Doshi
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedHoward Greenberg
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGandhi Ramu
 

Semelhante a Mini-training: Let’s Git It! (20)

Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git overview
Git overviewGit overview
Git overview
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
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
 
Git Training
Git TrainingGit Training
Git Training
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Git
GitGit
Git
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab Introduction
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 

Mais de Betclic Everest Group Tech Team

Mini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedMini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedBetclic Everest Group Tech Team
 

Mais de Betclic Everest Group Tech Team (20)

Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
 
Mini training - Moving to xUnit.net
Mini training - Moving to xUnit.netMini training - Moving to xUnit.net
Mini training - Moving to xUnit.net
 
Mini training - Introduction to Microsoft Azure Storage
Mini training - Introduction to Microsoft Azure StorageMini training - Introduction to Microsoft Azure Storage
Mini training - Introduction to Microsoft Azure Storage
 
Akka.Net
Akka.NetAkka.Net
Akka.Net
 
Mini training- Scenario Driven Design
Mini training- Scenario Driven DesignMini training- Scenario Driven Design
Mini training- Scenario Driven Design
 
Email Management in Outlook
Email Management in OutlookEmail Management in Outlook
Email Management in Outlook
 
Mini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity FoundationMini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity Foundation
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
 
Mini-Training: Docker
Mini-Training: DockerMini-Training: Docker
Mini-Training: Docker
 
Mini Training Flyway
Mini Training FlywayMini Training Flyway
Mini Training Flyway
 
Mini-Training: NDepend
Mini-Training: NDependMini-Training: NDepend
Mini-Training: NDepend
 
Management 3.0 Workout
Management 3.0 WorkoutManagement 3.0 Workout
Management 3.0 Workout
 
Lean for Business
Lean for BusinessLean for Business
Lean for Business
 
Training – Going Async
Training – Going AsyncTraining – Going Async
Training – Going Async
 
Mini-Training: Mobile UX Trends
Mini-Training: Mobile UX TrendsMini-Training: Mobile UX Trends
Mini-Training: Mobile UX Trends
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Mini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedMini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation Demystified
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Mini-Training: Roslyn
Mini-Training: RoslynMini-Training: Roslyn
Mini-Training: Roslyn
 
Mini-Training: Netflix Simian Army
Mini-Training: Netflix Simian ArmyMini-Training: Netflix Simian Army
Mini-Training: Netflix Simian Army
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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...
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 

Mini-training: Let’s Git It!

  • 1. Let’s Git It ! MAXIME LEMAITRE – 11/09/2014
  • 2. Agenda • Back to basis • What is that GIT/git/Git thing ? • Git Concepts • Demos • Working with Git – GitHub – Git + TFS – Git Tools for on Visual Studio • Why Git ? • Questions “Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency”
  • 3. What’s a version control system ? “An application that allows you to record changes to your codebase in a structured and controlled fashion” • Makes it way easier to undo errors / roll back to earlier versions of code • Makes it way easier to share a codebase between developers without creating conflicts • Makes it way easier to deploy changes from development to staging or production environments
  • 4. What is that GIT/git/Git thing? • Distributed Version Control System (DVCS) • Open source, free (GNU GPL V2) • Originally developed by Linus Torvalds for the development of the Linux Kernel in 2005 • Used by a lot of public/private projects • Focus on speed and efficiency • Quite a unique design and therefore sometimes a bit scary and difficult to understand
  • 5. Git Concepts Distributed vs. Centralized Centralized version control systems are based on the idea that there is a single central copy of your project somewhere (probably on a server), and programmers will “commit” their changes to this central copy. Distributed Version Control systems do not necessarily rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. This copy (or “clone”) has all of the metadata of the original.
  • 6. Git Concepts Data Storage Most VCSs tend to store data as changes to a base version of each file. But Git stores data as snapshots of the project over time. Git thinks of its data more like a set of snapshots of a mini filesystem
  • 7. Git Concepts Nearly Every Operation Is Local (Browse History, Commit, Branching, …). No need to be online. Very efficient and fast Git Has Integrity Everything is check-summed (SHA-1), it’s impossible to change the contents of any file or directory without Git knowing about it Git Generally Only Adds Data. Objects (blob, tree, commit, tag, ..) are immutable but references (branche, remote, …) always changes. Your files can reside in 3 states Modified means that you have changed the file but have not committed it to your database yet. Staged means that you have marked a modified file in its current version to go into your next commit snapshot Committed means that the data is safely stored in your local database.
  • 8. Basic Git Actions Clone A clone is a copy of a repository that lives on your computer instead of on a website's server somewhere. With your clone you can edit the files in your preferred editor and use Git to keep track of your changes without having to be online. It is connected to the remote version so that changes can be synced between the two. Commit When committing in Git, you save your code to your local repository, which then is versioned. Push When you push your code in Git, it means that you send your changes to the repository on the server ; after a push, your changes will also be available for other consumers of the central repository. Fetch When a fetch in Git is performed, you get an overview of changes on the central repository, you can see a list of changes made to the code and decide if you want to get the latest version. Pull When a pull is performed, you get the latest version of the server’s repository, with all other changes of other team members, a merge is automatically performed, although as far as Git can handle the differences.
  • 9. Git Demo try it at https://try.github.io/ // init a Git repository $ git init // start tracking changes made to all txt files => add them to the staging area $ git add '*.js' // Store our staged changes (current version) $ git commit -m 'Add all the js files' // add a remote remote repository (named origin) $ git remote add origin https://github.com/toto/mysuperproject.git // push local changes (commits) to the remote repo(branch master) $ git push -u origin master // pull down any new changes made by other people $ git pull origin master
  • 10. Git Concepts Branching, Killer-feature • Branching is very cheap • Branching operations (creation, deletion, merge) are always local • You can have multiple local branches that can be entirely independent of each other • Git encourages a workflow that branches and merges often, even multiple times in a day be sure to be on master branch … // Switched to a new branch "fixes“ $ git checkout –b hotfix // fix code // commit staged changes (the fix) $ git commit -m ‘Fixed hard coded password' // return to master $ git checkout master // merge local hoxfix branch to master $ git merge hotfix // delete local hoxfix branch $ git branch -d hotfix // push merged fixed …
  • 11. Git Concepts Branching workflow 1 2 3 4 Standard workflow (Local branches)
  • 12. Git Concepts Advanced Branching workflow
  • 13. Git Concepts Git Hooks • Hooks are executables scripts that executed before or after important events – commit, push, merge, checkout, receive…. (client/server) • Built-in feature - no need to download anything, run locally. • Only limited by developer's imagination. Some example : – Deploy a web site – Check commit message – We want to run test suite to run automatically every time we change something – We want to make sure that our test coverage is high enough • … (GitHub doesn’t support fully support hooks, but provide WebHooks and Services)
  • 14. Working with Git Git and/or TFS ? * Source Repos : Team Foundation Version Control or Git
  • 15. Git for TFS users Git Actions TFS Command Clone Create Workspace and Get Latest Checkout Switch workspace / branch Commit CheckIn / Shelve Status Pending Changes Push CheckIn Pull Get Latest Version Sync CheckIn and Get Latest Version
  • 16. Working with Git GitHub, Social Coding • Basically a Git repository hosting service… but it Provides a web-based graphical interface, desktop app for Mac, Linux, Windows • Adds many of its own features : issues, milestones, labels, wiki, API, team planning, graphs, … • Unlimited number of public repositories & collaborators • For private projects, you have to pay • You can clone any public repository, follow projects and developers, post comments, … 10 Million Repositories (end of 2013) Most Starred, May 2014 1 – twbs/bootstrap 2 – jquery/jquery 3 – joyent/node 4 – mbostock/d3.js 5 - angular/angular.js
  • 17. Working with Git Git Shell/Bash Explorer extensions allow you to work direclty in any folder.. Command line is the standard way to use git. Even if there are GUI tools, you will have to use it at least once !
  • 18. Working with Git GitHub for Windows Easiest way to use GitHub on Windows. https://windows.github.com/
  • 19. Working with Git Git and Visual Studio • Visual Studio 2013 includes Git tools by default – Previously it requires an extension Work with Visual Studio on OSS projects !
  • 20. How to contribute to an OSS Project ? Fork & Pull workflow Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary Pull requests = Commit + Comments + (issue ?) Remember to Follow project guidelines !
  • 21. Why Git ? • Decentralized Allow developers to work offline, look in history, commit some changes and create branchs • It’s extremely fast as nearly everything is local • Local Branching and merging is cheap • Perfectly suited for Open Source projects and use by many leaders • Tool extremely flexible, can support a wide, wide variety of developer workflows • Huge community • Because of GitHub
  • 23. References • https://try.github.io/ • http://nvie.com/posts/a-successful-git-branching-model/ • http://git-scm.com/ • http://johanleino.wordpress.com/2013/09/18/tfs-vs-git-or-is-it-tfs-with-git/ • http://www.slideshare.net/danielpcox/six3-getting-git • http://spring.io/blog/2010/12/21/social-coding-in-spring-projects • http://hashrocket.com/blog/posts/x-men-days-of-future-past-explained-in-git • http://gitready.com/ • http://stackoverflow.com/tags/git/info