0% found this document useful (0 votes)
38 views

Git Flow

Git Flow is a branching strategy for Git that defines strict handling of features, releases, and hotfixes. It consists of a philosophy, working principles, and an extension application. The philosophy advocates for master containing only production-ready code and develop containing code that compiles and passes tests but is not ready for release. Feature, release, and hotfix branches are used to develop and release code according to the Git Flow model.

Uploaded by

Khaerul Umam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Git Flow

Git Flow is a branching strategy for Git that defines strict handling of features, releases, and hotfixes. It consists of a philosophy, working principles, and an extension application. The philosophy advocates for master containing only production-ready code and develop containing code that compiles and passes tests but is not ready for release. Feature, release, and hotfix branches are used to develop and release code according to the Git Flow model.

Uploaded by

Khaerul Umam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Git-Flow

Git Flow is:

‣ A Philosophy A state of
mind
✦ Optimal for Agile Software Development
- Innovation
- Continuous Delivery

‣ A Working Principle
✦ Please follow it

‣ An Application (extension to git)


✦ Already installed in Singularity Container
✦ brew install git-flow-avh # (Mac)
✦ sudo apt-get install git-flow # (linux)
✦ https://github.com/petervanderdoes/gitflow-avh
The Git-Flow Manifesto

Vincent Driessen (2010)

http://nvie.com/posts/a-successful-git-branching-model/

Highly Recommended!
The Git-Flow Manifesto: Takeaways

‣ master is for releases only


‣ develop
- Not ready for pubic consumption but compiles and passes all tests
‣ Feature branches
- Where most development happens
- Branch off of develop
- Merge into develop
‣ Release branches
- Branch off of develop
- Merge into master and develop
‣ Hotfix
- Branch off of master
- Merge into master and develop
‣ Bugfix
- Branch off of develop Temporary
- Merge into develop (terminated after merge)
1) Enable git flow for the repo
‣ git flow init -d
Life cycle of a feature branch
(using git-flow)
2) Start the feature branch
‣ git flow feature start newstuff
‣ Creates a new branch called feature/newstuff that branches off of develop

3) Push it to GitHub for the first time


‣ Make changes and commit them locally
‣ git flow feature publish newstuff

4) Additional (normal) commits and pushes as needed


‣ git commit -a
‣ git push

5) Bring it up to date with develop (to minimize big changes on the ensuing pull request)
‣ git checkout develop
‣ git pull origin develop
‣ git checkout feature/newstuff
‣ git merge develop

6) Finish the feature branch (don’t use git flow feature finish)
‣ Do a pull request on GitHub from feature/newstuff to develop
‣ When successfully merged the remote branch will be deleted
‣ git remote update -p
‣ git branch -d feature/newstuff
For more information

JEDI Git Flow page


https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/en/latest/developer/
developer_tools/getting-started-with-gitflow.html

The Git Flow manifesto (all you need to know about the philosophy):
http://nvie.com/posts/a-successful-git-branching-model/

Git Flow cheat sheet:


https://danielkummer.github.io/git-flow-cheatsheet/

Git avh (a fork of the original, with added features):


https://github.com/petervanderdoes/gitflow-avh

Atlassian git-flow tutorial (philosophy and application):


https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-
workflow

You might also like