SlideShare a Scribd company logo
Basics and Team Workflow
Version Control
Local version control with folders
Version Control
Local version control with folders
Local Version Control
Local version control central
repository
• Bad for collaboration
• Error prone
• Possibility to overwrite the wrong files
Centralized Version Control
Centralized version control
• More control
• Better for sharing
• Better for collaboration,
but,
• Server is needed for every action
(commit, checkout, history)
• Single point of failure
Distributed Version Control
Distributed version control
• Better for collaboration
• Every clone is a copy of the repository
• With the exception of pull and push, every
action is local!
• Very fast!
Git
$ git clone <repo-url>
$ git status
$ git checkout -b new-stuff
< do some stuff (good and tested stuff) >
$ git add <files>
$ git status
$ git commit -m ‘My awesome development’
$ git pull
$ git push -u origin new-stuff
Git - The Three States
source: http://git-scm.com/
Git Branching
source: http://git-scm.com/
Storing data as changes to a base version of each file.
Git Branching
source: http://git-scm.com/
Storing data as snapshots of the project over time.
Git Branching
source: http://git-scm.com/
Git Branching
source: http://git-scm.com/
Git Branching
source: http://git-scm.com/
Git Log
Git Workflow - Working in teams
What is a workflow and how to define it?
There is more than one workflow:
• Centralized workflow
• Feature branch workflow
• Git Flow workflow
• Forking workflow
Git Workflow - Working in teams
Parallel Development
Using feature branches isolates the development in progress from finished work.
Feature branch are used to develop new features that are integrated (merged)
only when done!
Git Workflow - Working in teams
Release Staging Area
Complete work needs to be
integrated all together in one place.
There should be a specific branch
to do continuous integration,
validating every contribution to the
code base by building the
application and running tests.
Git Workflow - Working in teams
Support For Emergency Fixes
Hotfixes should be easy to do not blocked by
current development. Hotfix branches should
only contain the code needed to solve the
issue.
Git Workflow - Working in teams
Git Flow (Vincent Driesen)
Branches
• master (production ready)
• develop (integration)
• feature (new features)
• release (support release preparation)
• hotfix (quick production fix)
Git Workflow - Working in teams
Infinite lifetime branches
Git Workflow - Working in teams
Feature Branches
Git Workflow - Working in teams
Release Branches
Git Workflow - Working in teams
Hotfix Branches
Pull request
Pull request
Where to find me
www.ciromiranda.pt
@ciromiranda
Thank you
• https://guides.github.com/introduction/flow/
• https://www.atlassian.com/git/tutorials/compa
ring-workflows/
• https://try.github.io/levels/1/challenges/1
• http://git-scm.com/book/en/v2/
• http://nvie.com/posts/a-successful-git-
branching-model/
source: https://m.xkcd.com/1597/

More Related Content

What's hot

Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
Callon Campbell
 
Intro to Gitflow
Intro to GitflowIntro to Gitflow
Intro to Gitflow
Ben Speakmon
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow
Joan Yin
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
Chris Ballance
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
Sunil Dalal
 
Code review vs pull request
Code review vs pull requestCode review vs pull request
Code review vs pull request
Bryan Liu
 
WordPress - Whats going on in the server?
WordPress - Whats going on in the server? WordPress - Whats going on in the server?
WordPress - Whats going on in the server?
Herb Miller
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
Joseluis Laso
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
abodeltae
 
1 git-overview
1 git-overview1 git-overview
1 git-overview
ahmadezzeir
 
Continuous integrations - Basics
Continuous integrations - BasicsContinuous integrations - Basics
Continuous integrations - Basics
Barış İNANÇ
 
Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source tools
Sebastian Helzle
 
Zero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSSZero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSS
Mike McGarr
 
Git - A soft introduction
Git - A soft introductionGit - A soft introduction
Git - A soft introduction
Srikanth Sombhatla
 
Branch to branch by Photis Patriotis
Branch to branch by Photis PatriotisBranch to branch by Photis Patriotis
Branch to branch by Photis Patriotis
Prolific Interactive
 
貢獻開源專案 (Contribute to open source project)
貢獻開源專案 (Contribute to open source project)貢獻開源專案 (Contribute to open source project)
貢獻開源專案 (Contribute to open source project)
Hung Wu Lo
 
Dynamic bpm design by doing lightning talk
Dynamic bpm design by doing lightning talkDynamic bpm design by doing lightning talk
Dynamic bpm design by doing lightning talk
ITD Systems
 
O365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van RousseltO365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van Rousselt
NCCOMMS
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
COMAQA.BY
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 

What's hot (20)

Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Intro to Gitflow
Intro to GitflowIntro to Gitflow
Intro to Gitflow
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Code review vs pull request
Code review vs pull requestCode review vs pull request
Code review vs pull request
 
WordPress - Whats going on in the server?
WordPress - Whats going on in the server? WordPress - Whats going on in the server?
WordPress - Whats going on in the server?
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
1 git-overview
1 git-overview1 git-overview
1 git-overview
 
Continuous integrations - Basics
Continuous integrations - BasicsContinuous integrations - Basics
Continuous integrations - Basics
 
Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source tools
 
Zero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSSZero to the Cloud with @NetflixOSS
Zero to the Cloud with @NetflixOSS
 
Git - A soft introduction
Git - A soft introductionGit - A soft introduction
Git - A soft introduction
 
Branch to branch by Photis Patriotis
Branch to branch by Photis PatriotisBranch to branch by Photis Patriotis
Branch to branch by Photis Patriotis
 
貢獻開源專案 (Contribute to open source project)
貢獻開源專案 (Contribute to open source project)貢獻開源專案 (Contribute to open source project)
貢獻開源專案 (Contribute to open source project)
 
Dynamic bpm design by doing lightning talk
Dynamic bpm design by doing lightning talkDynamic bpm design by doing lightning talk
Dynamic bpm design by doing lightning talk
 
O365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van RousseltO365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van Rousselt
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 

Viewers also liked

Borobudur2
Borobudur2Borobudur2
NextStep24_company_4 EK
NextStep24_company_4 EKNextStep24_company_4 EK
NextStep24_company_4 EKErik Kuiken
 
Madame Tussauds Portfolio - P&P Projects
Madame Tussauds Portfolio - P&P ProjectsMadame Tussauds Portfolio - P&P Projects
Madame Tussauds Portfolio - P&P Projects
William Watts
 
Opteam yleisesittely
Opteam yleisesittelyOpteam yleisesittely
Opteam yleisesittelyTero Hakala
 
Social data analysis using apache flume, hdfs, hive
Social data analysis using apache flume, hdfs, hiveSocial data analysis using apache flume, hdfs, hive
Social data analysis using apache flume, hdfs, hive
ijctet
 
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
Ashley Smith
 
Іваненко С.В.
Іваненко С.В.Іваненко С.В.
Іваненко С.В.
Catherine Petrova
 

Viewers also liked (8)

Borobudur2
Borobudur2Borobudur2
Borobudur2
 
NextStep24_company_4 EK
NextStep24_company_4 EKNextStep24_company_4 EK
NextStep24_company_4 EK
 
Praevid_Ltd_Presentation
Praevid_Ltd_PresentationPraevid_Ltd_Presentation
Praevid_Ltd_Presentation
 
Madame Tussauds Portfolio - P&P Projects
Madame Tussauds Portfolio - P&P ProjectsMadame Tussauds Portfolio - P&P Projects
Madame Tussauds Portfolio - P&P Projects
 
Opteam yleisesittely
Opteam yleisesittelyOpteam yleisesittely
Opteam yleisesittely
 
Social data analysis using apache flume, hdfs, hive
Social data analysis using apache flume, hdfs, hiveSocial data analysis using apache flume, hdfs, hive
Social data analysis using apache flume, hdfs, hive
 
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
13th April 2014 Surfing Lesson at Middleton SA witg Surf & Sun
 
Іваненко С.В.
Іваненко С.В.Іваненко С.В.
Іваненко С.В.
 

Similar to Git basics, Team Workflows (Ciro Miranda)

GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
Haitham Raik
 
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
 
git Technologies
git Technologiesgit Technologies
git Technologies
Hirantha Pradeep
 
Working with Git
Working with GitWorking with Git
Working with Git
Tony Hillerson
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
Stephen Yeargin
 
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Mark Hamstra
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTS
Murughan Palaniachari
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
Abdul Salam
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
Serhii Kartashov
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
Kishor Kumar
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
Pranesh Vittal
 
Git
GitGit
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Ahmed El-Arabawy
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
Pablo Quiroga
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
Pablo Quiroga
 
Working with Git
Working with GitWorking with Git
Working with Git
Sanghoon Hong
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to Git
Muhil Vannan
 

Similar to Git basics, Team Workflows (Ciro Miranda) (20)

GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
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 Technologies
git Technologiesgit Technologies
git Technologies
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTS
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git
GitGit
Git
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to Git
 

Recently uploaded

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 

Recently uploaded (12)

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 

Git basics, Team Workflows (Ciro Miranda)