====== Gitflow ======
{{ :fr:git_icon.png?nolink |}}
GitFLow is a fairly widespread organization of Git repositories that segregates things properly and therefore collaborates with a large number of people.
Dedicated tools for Git have been created to allow greater work ease in merges, commits and passages between different branches.
If the branch organization is common to all people using the repository, the use of GitFlow tools is by no means mandatory. You can easily navigate through a GitFLow managed repository using Git's simple tools. Or mix the two. Using dedicated tools is a personal choice, which will only affect your local repository. They were just designed to facilitate work in a such configuration.
===== Presentation =====
GitFlow is based on a clear hierarchy of branches, which avoids unwanted commits on the main branches. The idea is to make clear additions of features, and to maintain stable states on the main branches.
There are generally several basic branches in a project(managed according to the GitFlow model):
* **Master** branch, the production version;
* The **Develop** branch, which is the unstable version, but in a "Debian-like" sense: "it's not crap, it's just that it can sometimes have unexpected functioning... bugs can appear!"
* **Feature** branches, each of which relates to the addition of a complex functionality(this may be related to a [[http://docs.gitlab.com/ee/gitlab-basics/create-issue. Html |Issue]], or even a set). After completing the work, we merge on **Develop**(and this automatically closes the issue of [[http://docs.gitlab.com/ce/customization/issue_closing.html |if you commit correctly]])
* A branch **Release**, which is a new branch, based on **Develop**, created when we think it's mature enough for a new production version. It only commits bug fixes. Once these are completed, one merges on the main branch, **Master**;
* Branches **Hotfix** relates to the **Master** branch, for ex: when a bug has been detected and it is imperative for a quick remedy. Once the solution is found, we merge the **HotFix** branch on the **Master** branch(and we include the patch in the **Develop** branch).
The branches shown in this picture:
{{ :fr:gitflow.png?nolink |Image extracted from the site http://nvie.com/posts/a-successful-git-branching-model/ © Vincent Driessen}}
===== Video presentation =====
[[https://www.grafikart.fr/formations/git/git-flow|{{ :fr:grafikart.png?nolink |}}]]
Grafikart offers a video of [[https://www.grafikart.fr/formations/git/git-flow |presentation of GitFlow]], as always of excellent quality.
{{youtube>ZQAQ4HcskAY?medium}}
===== Sites ressource =====
* The original presentation article by the creator: http://nvie.com/posts/a-successful-git-branching-model/
* A presentation in French: http://www.synbioz.com/blog/git-adopter-un-modele-de-versionnement-efficace
* In image (and in French), the commands of the different stages: https://danielkummer.github.io/git-flow-cheatsheet/index.fr_FR.html#features
{{tag>Data Tools}}