SlideShare a Scribd company logo
1 of 27
Download to read offline
Gitflow
by isatrio
An ordinary Front End Developer who like share knowledge. "I'm
not smarter than you, I'm just know first than you. If you find
something wrong, please tell me and we will fix it together."
Asumption
Repo is abbreviation of Repository
Pull is a command to get latest version of code
Push is a command to post our latest version of code
Branch is our own develop environment based on feature or
whatever we will doing
Commit is a command to tell git that we have done with our
own feature
Merge is a command to merge our work to whatever branch
we want
I use terminal only not using GUI
Collaboration
Developer have Back end, Front end, and whatever job title out
there. Every parts of job needs to organize well.
By manual, we will copy our work files to another team
Also syncronize it or just rewrite the file on local
If we have different code, we need to analyze it first before
rewrite.
Version Control
Version control is the management of changes to documents,
computer programs, large web sites, and other collections of
information.
Some of Version Control software:
SVN (Subversion)
Mercurial
Git
Git
Git is a version control system (VCS) software for tracking changes
in computer files and coordinating work on those files among
multiple people. With git, every person in project have their own
copy files at their local.
Some example of Git Providers are Github, Bitbucket, Gitlab, VSTS
How many workflows git have?
Centralized
Feature Branch
Gitflow
Fork
Centralized
Centralized just have one branch, "Master". Everytime create a
feature, we just create it at master branch.
Example
Jono start his works on his feature
Example
Putri start her works on her feature
Example
Jono publish his feature on master
Example
Putri publish her featuer on master, but she has a problem. Her
feature was conflicts with Jono's feature. Bejo want to be a hero, he
help Putri to fix the conflicts.
Example
Bejo help Putri to pull the latest version of master and rebase local
version for her.
Example
Rebase succeed, Putri can publish her feature on master cause of
Bejo. And then Putri hate Jono forever. Finally Bejo and Putri live
happily ever after.
Managing Conficts
This is a diagram of managing conflicts from Jono and Putri in
example above.
Feature Branch
Feature branch is a more safer and minimum conflicts instead
Centralized. Every person have their own branch to do the feature.
You can see below, Blue one is a master, the purple and green is a
branch.
Example
Putri start works on her feature
Example
Putri finish her feature and publish it on master and create pull
request to tell the team that she has done with her feature.
Example
Jono recieve the pull request from putri and merge on his feature
Gitflow
Gitflow workflow derived from Vincent Driessen at nvie. You can
download gitflow here https://github.com/nvie/gitflow.
Gitflow Branch
master is primary repo for production only
hotfixes is for fix feature that have realeased on master
realease is for realease a finish feature from develop
develop is a secondary repo for development stage, it will be
deploy in staging
feature is a branch to do feature from backlog
Gitflow manually
Since Gitflow have 2 branches we need to create one more called
develop
git checkout ­b develop master 
Explaination, we move to develop branch with command
"checkout". "­b" is an option to create a new branch if the branch
not exist. In a fourth section "develop" is a name of branch we want
to create. The last, "master" is base of branch we want to clone to
our branch.
Gitflow Feature
If we want to works on our feature we need to tell git to create once
more branch. Called "feature/feature­name". and when if we finish,
we merge on develop branch. You can follow command below
// create new branch 
git checkout ­b feature/feature­name develop 
// merge feature done 
git checkout develop 
git merge feature/feature­name 
git branch ­d feature/feature­name 
Gitflow Release
When the feature finish and no bugs on develop stage, then we
release feature to master. you can see below
// create new branch 
git checkout ­b release/release­name develop 
// merge release done 
git checkout master 
git merge release/release­name 
git checkout develop 
git merge release/release­name 
git branch ­d release/release­name 
Gitflow Hotfixes
Hotfixes is very similar with release but it clone from master.
// create new branch 
git checkout ­b hotfix/hotfix­name master 
// merge hotfix done 
git checkout master 
git merge hotfix/hotfix­name 
git checkout develop 
git merge hotfix/hotfix­name 
git branch ­d hotfix/hotfix­name 
Gitflow itself
There are the illustration of gitflow by manual. Fortunately, Gitflow
have a plugin for to make our life easier. I will attach the command
below. If you first clone from repo, you should run init, "­d" is to
make gitflow use default option, if not include "­d" you will prompted
to write what is your default name of gitflow.
git flow init [­d] 
git flow feature 
git flow feature start <name> [<base>] 
git flow feature finish <name> 
git flow release 
git flow release start <release> [<base>] 
git flow release finish <release> 
git flow hotfix 
git flow hotfix start <release> [<base>] 
git flow hotfix finish <release> 
Resources
Change issue tracker bitbucket using Kanban style Bucket
Board
Gitflow https://github.com/nvie/gitflow
Compare workflow
https://www.atlassian.com/git/tutorials/comparing­workflows
Oh Sh*t git shitgit.com

More Related Content

What's hot

What's hot (20)

Git Primer
Git PrimerGit Primer
Git Primer
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jira
 
From SVN to Git
From SVN to GitFrom SVN to Git
From SVN to Git
 
Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature Overview
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
 
Evolution of Version Control In Open Source
Evolution of Version Control In Open SourceEvolution of Version Control In Open Source
Evolution of Version Control In Open Source
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Git from SVN
Git from SVNGit from SVN
Git from SVN
 
Version Control System
Version Control SystemVersion Control System
Version Control System
 
Roslyn on GitHub
Roslyn on GitHubRoslyn on GitHub
Roslyn on GitHub
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHub
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
 
SBG Infrastructure Tools
SBG Infrastructure ToolsSBG Infrastructure Tools
SBG Infrastructure Tools
 
Deployment made easy with Git
Deployment made easy with GitDeployment made easy with Git
Deployment made easy with Git
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 

Similar to Gitflow - DILo Surabaya

Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 

Similar to Gitflow - DILo Surabaya (20)

Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Git&GitHub.pptx
Git&GitHub.pptxGit&GitHub.pptx
Git&GitHub.pptx
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
GDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdfGDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdf
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 
Workshop on Source control, git merge walkthroughs
Workshop on Source control, git merge walkthroughsWorkshop on Source control, git merge walkthroughs
Workshop on Source control, git merge walkthroughs
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Formation git
Formation gitFormation git
Formation git
 
Essential Tools for Modern PHP
Essential Tools for Modern PHPEssential Tools for Modern PHP
Essential Tools for Modern PHP
 
git KT .pptx
git KT .pptxgit KT .pptx
git KT .pptx
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
Getting Git
Getting GitGetting Git
Getting Git
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Git learning
Git learningGit learning
Git learning
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 

More from DILo Surabaya

More from DILo Surabaya (7)

Craate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo SurabayaCraate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo Surabaya
 
ERP an Introduction - DILo Surabaya
ERP an Introduction - DILo SurabayaERP an Introduction - DILo Surabaya
ERP an Introduction - DILo Surabaya
 
Introduction to Polymer Project - DILo Surabaya
Introduction to Polymer Project - DILo SurabayaIntroduction to Polymer Project - DILo Surabaya
Introduction to Polymer Project - DILo Surabaya
 
React Native - DILo Surabaya
React Native -  DILo SurabayaReact Native -  DILo Surabaya
React Native - DILo Surabaya
 
Open API Secification with Swagger - DILo Surabaya
Open API Secification with Swagger - DILo SurabayaOpen API Secification with Swagger - DILo Surabaya
Open API Secification with Swagger - DILo Surabaya
 
Having Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo SurabayaHaving Fun with Kotlin Android - DILo Surabaya
Having Fun with Kotlin Android - DILo Surabaya
 
Concurrent Programming in Golang - DILo Surabaya
Concurrent Programming in Golang - DILo SurabayaConcurrent Programming in Golang - DILo Surabaya
Concurrent Programming in Golang - DILo Surabaya
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Gitflow - DILo Surabaya