Skip to content

Instantly share code, notes, and snippets.

@mateodelnorte
Created December 6, 2016 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mateodelnorte/e0f53991b9343febfe4c9f5436bf2d21 to your computer and use it in GitHub Desktop.
Save mateodelnorte/e0f53991b9343febfe4c9f5436bf2d21 to your computer and use it in GitHub Desktop.
What's Git Flow?
A clean way to structure your git branches!
Git-flow is a process for managing changes in Git that was created by Vincent Driessen and accompanied by some Git extensions
for managing that flow.
The general idea behind git-flow is to have several separate branches that always exist, each for a different purpose: master,
development, feature, release, and hotfix.
The process of feature or bug development flows from one branch into another before it’s finally released.
How does this look in practice?
Joanne joins the team.
- mkdir C:\development\ourteam
- cd C:\development\ourteam
- git clone //server/ourteam/ourproject.git
(pulling down all the things)
- git fetch
(receives all branches and sees the following:)
~ master
development
feature/put-a-grid-on-it
(she's now ready to get the current code everyone is working on)
- git checkout development
(and can now embark on making her first feature)
- git checkout -b feature/add-my-name-to-the-readme-files
(at this point, she can work on this branch until her feature is complete)
(if other people finish features, they'll pull them into or merge them into the development branch)
- git pull origin development
(she can stay up to date by periodically doing a `git pull origin development`, and get their code)
(when she's done with her feature, she'll communicate to the team and merge or pull into development)
- git add .
- git commit -am 'finishing final touches on README.md'
- git push origin feature/add-my-name-to-the-readme-files
(on and on until done with the feature)
(once done...)
- git checkout development
- git pull origin development
- git pull origin feature/add-my-name-to-the-readme-files
- git push origin development
(and now development has incorporated all of her new changes).
----
take your development files and deploy them!
- update release notes
- tag development branch v1.5.1
-- release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment