SlideShare a Scribd company logo
Git Workflows 
Noam Kfir | Sela Group | 2014
Workflows 
 Centralized 
 Feature Branch 
 Gitflow 
 Forking 
 Pull Requests 
Adapted from Atlassian, experience and other sources
Centralized – Overview 
 Centralized by convention 
 One shared branch  master 
 Central history is never rewritten! 
 Central repository is usually bare 
 Emulates a central VCS like TFS or Subversion 
 Local master tracks remote master 
 Local rebase often preferable to merge 
 Local repository is never bare
The Centralized Workflow 
master
Centralized – Typical Sequence 
 git clone remote // copy the central repository to a local repository 
 // iterative edit/stage/commit process 
 git pull [--rebase] origin master // merge or rebase the latest central version 
 git push [origin master] // share your work with the central repository
Centralized – Ramifications 
 Suitable for small teams 
 Supports multiple atomic commits before sharing with the team 
 Risk losing local history if changes are not pushed often enough 
 Larger teams working on more concurrent features are more difficult to manage 
 Higher chance of merge conflicts 
 Harder to keep the central master history linear 
 Has limited support for communication
The Feature Branch Workflow 
master 
foo 
bar
Feature Branch – Overview 
 Dedicated feature branches 
 Often combined with Centralized 
Workflow 
 Feature branches are pushed to the 
central repository 
 Devs never work on the master branch 
 Individual features built on dedicated 
feature branches 
 Backup for feature branches too 
 Multiple devs work on the same feature
Feature Branch – Typical Sequence 
 git clone remote // copy the central repository to a local repository 
 git checkout -b new-feature // create a new local feature branch 
 // iterative edit/stage/commit process 
 git push [-u origin new-feature] // share the branch [and track it]
Feature Branch – Merge Into master 
 git checkout master 
 git pull [--rebase] origin new-feature // merge [or rebase] the latest central version 
 git push origin master // send the final version to the central master
Feature Branch – Ramifications 
 Suitable for larger teams working on multiple concurrent features 
 The central repository contains both master and feature branches 
 The master branch is easier to control and safeguard 
 Very flexible workflow but relies on responsible programmers 
 Supports: 
 pull requests 
 isolated experiments 
 efficient collaboration
The Gitflow Workflow 
image source: https://www.atlassian.com/git/workflows#!workflow-gitflow
Gitflow – Overview 
 Focused on project release cycle 
 Similar to the Feature Branch Workflow 
 Uses a strict branching model 
 Uses a central repository 
• Feature branches 
• Individual branches 
 Each branch has a specific role 
 Strict rules on when branches can interact
Gitflow - Branches 
master 
hotfix 
release 
develop 
feature 
• official releases, tagged 
• patches, bug fixes [ master] 
• release targets [ master] 
• feature integration branch [ release] 
• dedicated feature branches [ develop]
Gitflow – The master Branch 
 The central authority 
 Sacred 
 Every commit represents a version 
 Every commit has a version tag 
 Branch from master: only hotfix and develop 
 Push to master: only hotfix and release
Gitflow – Hotfixes 
 Hotfixes are meant for critical maintenance issues only 
 Based on master, pushed to master 
 Usually numbered as a minor version 
 Sidestep the normal development workflow  discouraged! 
Numbered 
hotfix 
branched 
from master 
Merged 
back into 
master 
master 
tagged with 
version tag 
hotfix 
merged 
into 
develop 
hotfix 
deleted
Gitflow – Features 
 There is only one develop branch, based on master 
 Every feature has its own feature branch 
 feature branches based on develop, pushed to develop 
 feature branches named for the features 
Named 
feature 
branched 
from 
develop 
feature 
shared with 
team 
Concurrent 
local work 
on feature 
feature 
merged 
back into 
develop 
when ready 
feature 
(optionally) 
deleted
Gitflow – Releases 
 There is only one develop branch, based on master 
 Every release has its own release branch, based on develop 
 release named with version number (usually either major or minor) 
 release branches are merged into master and develop when releases are ready 
Numbered 
release 
branched 
from 
develop 
Bug fixes, 
docs, 
preparation 
on release 
release 
merged into 
master 
when ready 
to ship 
master 
tagged with 
version tag 
release 
merged 
back into 
develop 
release 
deleted
Gitflow – Ramifications 
 Intended for large projects 
 Feature teams can continue working while the current release is being prepared 
 Same advantages as Feature Branch Workflow: 
 pull requests 
 isolated experiments 
 efficient collaboration 
 Branch structure mirrors release process: 
 visually identifiable 
 easy to communicate
The Forking Workflow 
foo 
master 
foo 
master 
bar 
master
The Forking Workflow 
 A distributed workflow 
 Every dev forks the official repository 
 Official maintainer has ultimate control, 
but only by agreement 
 Unrelated to the Centralized Workflow 
 Forks are private server copies 
 No shared centralized repositories 
 Central authority is arbitrary 
and determined by policy or consensus
Forking – Branches 
 Multiple repositories: 
 “Official” public server repository 
 Forked server repositories 
 Cloned local repositories 
 Forking is different from cloning – forking creates a bare server copy, cloning creates a full local copy 
 Each developer has exclusive write access only to their own repositories 
 To integrate back into the official repository, developers push to theirs and then issue a pull request 
 Local clones of forked repositories usually define two remotes: 
 origin – points to the forked repository 
 upstream – points to the official public repository
Forking – Ramifications 
 Designed for large organic teams, including open source projects and distributed teams 
 Every dev can do their own private Feature Branch workflow with their own server 
 Official maintainer is very common in open source projects 
 Companies give write access to official repository/branch to responsible “maintainer” 
 Extremely effective with pull requests
Understanding Pull Requests 
 Safety net 
 Distributed communication mechanism 
 Effective code review platform 
 Not actually part of git! 
 When a feature is complete, it is not merged into master 
 The feature developer issues a pull request to the maintainer of the master branch 
 The maintainer reviews the changes and then merges them or rejects them 
 The pull request is a forum for discussion about the feature 
 Pull requests facilitate better communication and code reviews
The Pull Request Workflow 
Feature is 
finished in 
private 
branch 
Dev issues 
pull request 
to source 
repo 
Maintainer 
reviews 
changes 
Maintainer 
and dev 
discuss the 
feature 
Maintainer 
merges or 
rejects 
request
Summary 
 Git is a very rich distributed version control system 
 Its design supports many different types of workflows, 
including centralized and distributed workflows 
and is suitable for: 
 individual programmers 
 small co-located teams 
 massive distributed teams 
 anything from open source projects to corporations 
 Its workflows have evolved over the years to popular, mature and proven guidelines
Thank You!

More Related Content

What's hot

Git workflows
Git workflowsGit workflows
Git workflows
Thuc Le Dong
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
Callon Campbell
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily useMediacurrent
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
Hean Hong Leong
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
Clarive 7 Branching Model
Clarive 7 Branching ModelClarive 7 Branching Model
Clarive 7 Branching Model
Clarive
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflowRuben Tan
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Git flow
Git flowGit flow
Git flow
Valerio Como
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 
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 and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Maulik Shah
 
Customizing Magnolia Workflow
Customizing Magnolia WorkflowCustomizing Magnolia Workflow
Customizing Magnolia Workflow
Magnolia
 
Git and GitFlow branching model
Git and GitFlow branching modelGit and GitFlow branching model
Git and GitFlow branching model
Pavlo Hodysh
 

What's hot (20)

Git workflows
Git workflowsGit workflows
Git workflows
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
 
Git flow
Git flowGit flow
Git flow
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
Clarive 7 Branching Model
Clarive 7 Branching ModelClarive 7 Branching Model
Clarive 7 Branching Model
 
Git workflows
Git workflowsGit workflows
Git workflows
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflow
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Git flow
Git flowGit flow
Git flow
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
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 and git flow
Git and git flowGit and git flow
Git and git flow
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
 
Customizing Magnolia Workflow
Customizing Magnolia WorkflowCustomizing Magnolia Workflow
Customizing Magnolia Workflow
 
Git and GitFlow branching model
Git and GitFlow branching modelGit and GitFlow branching model
Git and GitFlow branching model
 

Similar to Git Workflows

CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdf
albusfons939393
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version ControlNowell Strite
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
InCycleSoftware
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
daveymni
 
Source code management
Source code managementSource code management
Source code managementWidoyo PH
 
Understanding Distributed Source Control
Understanding Distributed Source ControlUnderstanding Distributed Source Control
Understanding Distributed Source ControlLorna Mitchell
 
Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)
Ciro Miranda
 
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
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
Edward Goikhman
 
SVN Information
SVN Information  SVN Information
SVN Information
RAHUL TRIPATHI
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
Haitham Raik
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
Maidul Islam
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
 
Git
GitGit
Switching to Git
Switching to GitSwitching to Git
Switching to Git
Stephen Yeargin
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Callon Campbell
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
Ori Donner
 

Similar to Git Workflows (20)

CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdf
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
 
Source code management
Source code managementSource code management
Source code management
 
Understanding Distributed Source Control
Understanding Distributed Source ControlUnderstanding Distributed Source Control
Understanding Distributed Source Control
 
Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)Git basics, Team Workflows (Ciro Miranda)
Git basics, Team Workflows (Ciro Miranda)
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 
SVN Information
SVN Information  SVN Information
SVN Information
 
HelloGit
HelloGitHelloGit
HelloGit
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
 
Git
GitGit
Git
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 

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-Delusion
Noam Kfir
 
Testers and Coders - Blurring the Lines
Testers and Coders - Blurring the LinesTesters and Coders - Blurring the Lines
Testers and Coders - Blurring the Lines
Noam 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 Hole
Noam Kfir
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
Noam Kfir
 
There Is No JavaScript
There Is No JavaScriptThere Is No JavaScript
There Is No JavaScript
Noam Kfir
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
Noam Kfir
 
Meteor
MeteorMeteor
Meteor
Noam Kfir
 
Clean code
Clean codeClean code
Clean code
Noam Kfir
 
Maximizing UI Automation – A Case Study
Maximizing UI Automation – A Case StudyMaximizing UI Automation – A Case Study
Maximizing UI Automation – A Case Study
Noam Kfir
 
Web components
Web componentsWeb components
Web components
Noam 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 Web
Noam 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 Cordova
Noam Kfir
 
Telerik Platform
Telerik PlatformTelerik Platform
Telerik Platform
Noam Kfir
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
Noam 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 (15)

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
 
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

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 

Git Workflows

  • 1. Git Workflows Noam Kfir | Sela Group | 2014
  • 2. Workflows  Centralized  Feature Branch  Gitflow  Forking  Pull Requests Adapted from Atlassian, experience and other sources
  • 3. Centralized – Overview  Centralized by convention  One shared branch  master  Central history is never rewritten!  Central repository is usually bare  Emulates a central VCS like TFS or Subversion  Local master tracks remote master  Local rebase often preferable to merge  Local repository is never bare
  • 5. Centralized – Typical Sequence  git clone remote // copy the central repository to a local repository  // iterative edit/stage/commit process  git pull [--rebase] origin master // merge or rebase the latest central version  git push [origin master] // share your work with the central repository
  • 6. Centralized – Ramifications  Suitable for small teams  Supports multiple atomic commits before sharing with the team  Risk losing local history if changes are not pushed often enough  Larger teams working on more concurrent features are more difficult to manage  Higher chance of merge conflicts  Harder to keep the central master history linear  Has limited support for communication
  • 7. The Feature Branch Workflow master foo bar
  • 8. Feature Branch – Overview  Dedicated feature branches  Often combined with Centralized Workflow  Feature branches are pushed to the central repository  Devs never work on the master branch  Individual features built on dedicated feature branches  Backup for feature branches too  Multiple devs work on the same feature
  • 9. Feature Branch – Typical Sequence  git clone remote // copy the central repository to a local repository  git checkout -b new-feature // create a new local feature branch  // iterative edit/stage/commit process  git push [-u origin new-feature] // share the branch [and track it]
  • 10. Feature Branch – Merge Into master  git checkout master  git pull [--rebase] origin new-feature // merge [or rebase] the latest central version  git push origin master // send the final version to the central master
  • 11. Feature Branch – Ramifications  Suitable for larger teams working on multiple concurrent features  The central repository contains both master and feature branches  The master branch is easier to control and safeguard  Very flexible workflow but relies on responsible programmers  Supports:  pull requests  isolated experiments  efficient collaboration
  • 12. The Gitflow Workflow image source: https://www.atlassian.com/git/workflows#!workflow-gitflow
  • 13. Gitflow – Overview  Focused on project release cycle  Similar to the Feature Branch Workflow  Uses a strict branching model  Uses a central repository • Feature branches • Individual branches  Each branch has a specific role  Strict rules on when branches can interact
  • 14. Gitflow - Branches master hotfix release develop feature • official releases, tagged • patches, bug fixes [ master] • release targets [ master] • feature integration branch [ release] • dedicated feature branches [ develop]
  • 15. Gitflow – The master Branch  The central authority  Sacred  Every commit represents a version  Every commit has a version tag  Branch from master: only hotfix and develop  Push to master: only hotfix and release
  • 16. Gitflow – Hotfixes  Hotfixes are meant for critical maintenance issues only  Based on master, pushed to master  Usually numbered as a minor version  Sidestep the normal development workflow  discouraged! Numbered hotfix branched from master Merged back into master master tagged with version tag hotfix merged into develop hotfix deleted
  • 17. Gitflow – Features  There is only one develop branch, based on master  Every feature has its own feature branch  feature branches based on develop, pushed to develop  feature branches named for the features Named feature branched from develop feature shared with team Concurrent local work on feature feature merged back into develop when ready feature (optionally) deleted
  • 18. Gitflow – Releases  There is only one develop branch, based on master  Every release has its own release branch, based on develop  release named with version number (usually either major or minor)  release branches are merged into master and develop when releases are ready Numbered release branched from develop Bug fixes, docs, preparation on release release merged into master when ready to ship master tagged with version tag release merged back into develop release deleted
  • 19. Gitflow – Ramifications  Intended for large projects  Feature teams can continue working while the current release is being prepared  Same advantages as Feature Branch Workflow:  pull requests  isolated experiments  efficient collaboration  Branch structure mirrors release process:  visually identifiable  easy to communicate
  • 20. The Forking Workflow foo master foo master bar master
  • 21. The Forking Workflow  A distributed workflow  Every dev forks the official repository  Official maintainer has ultimate control, but only by agreement  Unrelated to the Centralized Workflow  Forks are private server copies  No shared centralized repositories  Central authority is arbitrary and determined by policy or consensus
  • 22. Forking – Branches  Multiple repositories:  “Official” public server repository  Forked server repositories  Cloned local repositories  Forking is different from cloning – forking creates a bare server copy, cloning creates a full local copy  Each developer has exclusive write access only to their own repositories  To integrate back into the official repository, developers push to theirs and then issue a pull request  Local clones of forked repositories usually define two remotes:  origin – points to the forked repository  upstream – points to the official public repository
  • 23. Forking – Ramifications  Designed for large organic teams, including open source projects and distributed teams  Every dev can do their own private Feature Branch workflow with their own server  Official maintainer is very common in open source projects  Companies give write access to official repository/branch to responsible “maintainer”  Extremely effective with pull requests
  • 24. Understanding Pull Requests  Safety net  Distributed communication mechanism  Effective code review platform  Not actually part of git!  When a feature is complete, it is not merged into master  The feature developer issues a pull request to the maintainer of the master branch  The maintainer reviews the changes and then merges them or rejects them  The pull request is a forum for discussion about the feature  Pull requests facilitate better communication and code reviews
  • 25. The Pull Request Workflow Feature is finished in private branch Dev issues pull request to source repo Maintainer reviews changes Maintainer and dev discuss the feature Maintainer merges or rejects request
  • 26. Summary  Git is a very rich distributed version control system  Its design supports many different types of workflows, including centralized and distributed workflows and is suitable for:  individual programmers  small co-located teams  massive distributed teams  anything from open source projects to corporations  Its workflows have evolved over the years to popular, mature and proven guidelines