An introduction to Git and GitFlow
(& how we use Git at Marie Curie)
Mark Everard / @ev2000
Technical Lead
What is Git?
• Git is a revision control system
• Originally developed by Linus
Torvalds (Linux Emperor!)
• It is a distributed version control
system
• Very very widely used
42.9% May 2014, 36.3% May 2013
Full stats from https://en.wikipedia.org/wiki/Git_(software)
Its like SVN right?
It is and it isn’t
• It serves the same purpose
It does it in a very different way
• Has a steeper learning curve than SVN
• Different terminology
• Have to unlearn some SVN
‘knowledge’
Key differences
• You checkout / clone a complete
source control repository
• You have the entire history of the
repository on your machine
• Simplifies merging – everything in
Git is a branch
https://git.wiki.kernel.org/index.php/GitSvnComparsion
Common git terminology
ORIGIN
Your centralised repository (for us
this is GitHub – though in true
DVCS there isn’t one)
HEAD
Where your current repository
points.. Most of the time this is
the latest revision in your branch
Common git commands
Command line FTW 
Git command
> git status Review what changes you’ve
made
> git add <files> Stages files for a commit (allows
you to choose what to add)
> git commit <files> Commit file to your HEAD
source control
Common git commands
Command line FTW 
Git command
> git pull Pull down and merge commits
from a remote repository
> git push <remote> Push commits to a remote
repository
> git remote Lists all remotes that you have
configured. You will generally
have one (from GitHub)
Common git commands
Sh*t I’ve made a mistake – how to undo
Git command
> git reset HEAD~2
(moves your head back two revisions)
Undo changes that haven’t
been shared with anyone else.
Git will GC the dangling
commits
> git checkout HEAD~2
(moves your head back two revisions)
Inspect what the state was 2
commits ago.
Will detach head (meaning it
doesn’t have a branch - BAD)
> git revert HEAD~2 Reverting undoes a commit by
creating a new commit (exactly
what you’d do manually)
Tooling
• One area where SVN is more
advanced than Git
• If you understand the basic
commands GUI’s will make more
sense
• Pick one as a team, you can then
support each other.
My favourite is SourceTree
Principles
• If it’s not in source control, it
doesn’t exist
• Commit early, commit often
• Always inspect your changes
before committing
• Remember the axe-murderer
when writing commit messages
Work flows
• Git’s power actually comes from
how you use it
• SVN has a simple and rigid
workflow (trunk, tags, branches)
• Git offers many different type of
workflows to suit different sized
teams and release strategies
Simple Flow
Good for small development teams
and definite schedules
Branch name Usage Rules
master Represents the current code
base that is deployed to
production servers
• Releases are taken from master
• master should only be committed
too directly in the case of a hotfix
• Any direct commits should be up-
merged to develop
develop Represents the work-in-
progress of all changes that
are being made on the
project
• develop should be merged to
master for a release
• release should not be made
directly from develop
Git Flow
For complex multiple teams projects
allowing flexible releases
(feature branching)
Git Flow
For complex multiple teams projects
allowing flexible releases
• Strict branching model
• Feature branching
GitFlow
https://www.atlassian.com/git/tutorials/comp
aring-workflows/feature-branch-workflow
Branch name Usage Rules
master Represents the current code
base that is deployed to
production servers
• Releases are taken from master
• master should only be committed too directly
in the case of a hotfix
• Any direct commits should be up-merged to
develop
develop Represents the current
release candidate
• develop should be merged to master for a
release
• release should not be made directly from
develop
feature branches Represent a single in-
progress feature
• Must branch from develop
• Must merge to develop
• Regular up-merging from develop should take
place
• Only merged to develop when QA is passed
• Branches should be deleted when feature is
merged
release branches Represents a finalised
release candidate
• Must branch from develop
• Must merge to master and develop
• Bug fixes found during the UAT / Regression
periods should be committed here
• When the branch is ready to release, it should
be merged to master and develop.
• After the above merges / deployment the
release branch should be deleted
hotfix branches Represents a fix for an urgent
issue found in production
• Must branch from master
• Must merge to master and develop
• Branch should be deleted post merge
• Never release from a hotfix branch
Branch naming
The following conventions apply. General rules are to be
descriptive and to allow the team to understand the
feature.
• release branches should be named
release/{release-name}
e.g. release/sprint-28 or release/picturewall-phase-1
• feature branches should be name
feature/{name-JIRA-story/epic-number}
e.g. feature/blog-bcweb-594 or feature/picturegallery-dam-4
• hotfix branches should be named
hotfix/{JIRA-bug-number}
e.g. hotfix/bcweb-3601 or hotfix/dam-90
An introduction to Git and GitFlow

More Related Content

PPTX
Gitflow - Una metología para manejo de Branches
PDF
Git flow for daily use
PDF
Git Workflow With Gitflow
PDF
Git flow Introduction
PDF
Pubmi gitflow
PDF
Git and git flow
PDF
19 GitFlow #burningkeyboards
PPTX
Git flow
Gitflow - Una metología para manejo de Branches
Git flow for daily use
Git Workflow With Gitflow
Git flow Introduction
Pubmi gitflow
Git and git flow
19 GitFlow #burningkeyboards
Git flow

What's hot (20)

PDF
From SVN to Git
PDF
Git & gitflow
PDF
Git with the flow
PDF
Git-flow workflow and pull-requests
PPT
Git workflows presentation
PPTX
Introduction to git administration
PPTX
ODP
Git Flow - An Introduction
PDF
PDF
Git Tricks — git utilities that make life git easier
PDF
Training: Day Two - Eclipse, Git, Maven
PDF
BLUG 2012 Version Control for Notes Developers
PPTX
Git extension-training
PPTX
Introduction to github slideshare
PDF
Git workflows
PPTX
My Git workflow
PDF
Software Versioning with Bitbucket and Eclipse
PPTX
Git Pull Requests
PPTX
Git presentation
PDF
Subversion to Git Migration
From SVN to Git
Git & gitflow
Git with the flow
Git-flow workflow and pull-requests
Git workflows presentation
Introduction to git administration
Git Flow - An Introduction
Git Tricks — git utilities that make life git easier
Training: Day Two - Eclipse, Git, Maven
BLUG 2012 Version Control for Notes Developers
Git extension-training
Introduction to github slideshare
Git workflows
My Git workflow
Software Versioning with Bitbucket and Eclipse
Git Pull Requests
Git presentation
Subversion to Git Migration
Ad

Similar to An introduction to Git and GitFlow (20)

PPTX
Git usage (Basics and workflow)
PDF
Introducing Git and git flow
PDF
Git with t for teams
PPTX
Lets git to it
PDF
Git basics a starter on git and its ecosystem
PDF
Intro to Gitflow
PDF
Be a Happier Developer with Git / Productive Team #gettinggitright
PPTX
01 - Git vs SVN
PDF
Improving your workflow with git
PPTX
Git & GitLab
PPT
PPTX
Git tips and tricks
PDF
HPLN Meet Git - Public
PPT
Introduction to git
PDF
Tool Development A - Git
PPT
PPTX
GIT In Detail
PDF
Git and GitHub workflows
PPTX
GIT INTRODUCTION
PPTX
Ultimate Git Workflow - Seoul 2015
Git usage (Basics and workflow)
Introducing Git and git flow
Git with t for teams
Lets git to it
Git basics a starter on git and its ecosystem
Intro to Gitflow
Be a Happier Developer with Git / Productive Team #gettinggitright
01 - Git vs SVN
Improving your workflow with git
Git & GitLab
Git tips and tricks
HPLN Meet Git - Public
Introduction to git
Tool Development A - Git
GIT In Detail
Git and GitHub workflows
GIT INTRODUCTION
Ultimate Git Workflow - Seoul 2015
Ad

Recently uploaded (20)

PDF
STKI Israel Market Study 2025 version august
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Architecture types and enterprise applications.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
STKI Israel Market Study 2025 version august
Hindi spoken digit analysis for native and non-native speakers
NewMind AI Weekly Chronicles – August ’25 Week III
Architecture types and enterprise applications.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
observCloud-Native Containerability and monitoring.pptx
Final SEM Unit 1 for mit wpu at pune .pptx
Zenith AI: Advanced Artificial Intelligence
WOOl fibre morphology and structure.pdf for textiles
Developing a website for English-speaking practice to English as a foreign la...
CloudStack 4.21: First Look Webinar slides
A contest of sentiment analysis: k-nearest neighbor versus neural network
sustainability-14-14877-v2.pddhzftheheeeee
Taming the Chaos: How to Turn Unstructured Data into Decisions
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx

An introduction to Git and GitFlow

  • 1. An introduction to Git and GitFlow (& how we use Git at Marie Curie) Mark Everard / @ev2000 Technical Lead
  • 2. What is Git? • Git is a revision control system • Originally developed by Linus Torvalds (Linux Emperor!) • It is a distributed version control system • Very very widely used 42.9% May 2014, 36.3% May 2013 Full stats from https://en.wikipedia.org/wiki/Git_(software)
  • 3. Its like SVN right? It is and it isn’t • It serves the same purpose It does it in a very different way • Has a steeper learning curve than SVN • Different terminology • Have to unlearn some SVN ‘knowledge’
  • 4. Key differences • You checkout / clone a complete source control repository • You have the entire history of the repository on your machine • Simplifies merging – everything in Git is a branch https://git.wiki.kernel.org/index.php/GitSvnComparsion
  • 5. Common git terminology ORIGIN Your centralised repository (for us this is GitHub – though in true DVCS there isn’t one) HEAD Where your current repository points.. Most of the time this is the latest revision in your branch
  • 6. Common git commands Command line FTW  Git command > git status Review what changes you’ve made > git add <files> Stages files for a commit (allows you to choose what to add) > git commit <files> Commit file to your HEAD source control
  • 7. Common git commands Command line FTW  Git command > git pull Pull down and merge commits from a remote repository > git push <remote> Push commits to a remote repository > git remote Lists all remotes that you have configured. You will generally have one (from GitHub)
  • 8. Common git commands Sh*t I’ve made a mistake – how to undo Git command > git reset HEAD~2 (moves your head back two revisions) Undo changes that haven’t been shared with anyone else. Git will GC the dangling commits > git checkout HEAD~2 (moves your head back two revisions) Inspect what the state was 2 commits ago. Will detach head (meaning it doesn’t have a branch - BAD) > git revert HEAD~2 Reverting undoes a commit by creating a new commit (exactly what you’d do manually)
  • 9. Tooling • One area where SVN is more advanced than Git • If you understand the basic commands GUI’s will make more sense • Pick one as a team, you can then support each other. My favourite is SourceTree
  • 10. Principles • If it’s not in source control, it doesn’t exist • Commit early, commit often • Always inspect your changes before committing • Remember the axe-murderer when writing commit messages
  • 11. Work flows • Git’s power actually comes from how you use it • SVN has a simple and rigid workflow (trunk, tags, branches) • Git offers many different type of workflows to suit different sized teams and release strategies
  • 12. Simple Flow Good for small development teams and definite schedules Branch name Usage Rules master Represents the current code base that is deployed to production servers • Releases are taken from master • master should only be committed too directly in the case of a hotfix • Any direct commits should be up- merged to develop develop Represents the work-in- progress of all changes that are being made on the project • develop should be merged to master for a release • release should not be made directly from develop
  • 13. Git Flow For complex multiple teams projects allowing flexible releases (feature branching)
  • 14. Git Flow For complex multiple teams projects allowing flexible releases • Strict branching model • Feature branching
  • 16. Branch name Usage Rules master Represents the current code base that is deployed to production servers • Releases are taken from master • master should only be committed too directly in the case of a hotfix • Any direct commits should be up-merged to develop develop Represents the current release candidate • develop should be merged to master for a release • release should not be made directly from develop feature branches Represent a single in- progress feature • Must branch from develop • Must merge to develop • Regular up-merging from develop should take place • Only merged to develop when QA is passed • Branches should be deleted when feature is merged release branches Represents a finalised release candidate • Must branch from develop • Must merge to master and develop • Bug fixes found during the UAT / Regression periods should be committed here • When the branch is ready to release, it should be merged to master and develop. • After the above merges / deployment the release branch should be deleted hotfix branches Represents a fix for an urgent issue found in production • Must branch from master • Must merge to master and develop • Branch should be deleted post merge • Never release from a hotfix branch
  • 17. Branch naming The following conventions apply. General rules are to be descriptive and to allow the team to understand the feature. • release branches should be named release/{release-name} e.g. release/sprint-28 or release/picturewall-phase-1 • feature branches should be name feature/{name-JIRA-story/epic-number} e.g. feature/blog-bcweb-594 or feature/picturegallery-dam-4 • hotfix branches should be named hotfix/{JIRA-bug-number} e.g. hotfix/bcweb-3601 or hotfix/dam-90