RidgeRun Developer Manual - Methodologies - Gitflow

From RidgeRun Developer Connection
< RidgeRun Developer Manual‎ | Methodologies
Revision as of 10:27, 3 November 2020 by Jchaves (talk | contribs) (Merging feature branches)
Jump to: navigation, search




Previous: Methodologies Index Next: Methodologies/Project Cycles





About Gitflow Methodologies

A "gitflow" methodology is no more than a set of practices that defined the workflow for software development involving a version control system like git. RidgeRun follows a gitflow based on the feature branch model. This model has several advantages:

  • It is very well suited for project scheduled on release cycles.
  • Allows to maintain a stable code base for all developers involved after each release, which synergizes very well with continuous integration practices.
  • Feature branches allow to implement pull requests, a type of code review.
  • Feature development isolation. Each developer works on its branch and does not affect the development of other branches by other developers.
  • There are very well defined roles for a git branch, for example, there is the development branch, the master branches, the hotfix branches, etc.

Some particular considerations on the feature branch model

Rebasing feature branches

Let's assume this scenario, person A and person B are working in parallel each one on individual feature branches that diverged from the same commit in the development branch. Now, let's assume person B got his/her feature branch approved first than person A. Once person B merges the feature branch in the development branch, person B should tell person A that he/she needs to rebase his/her feature branch so person A can follow these commands:

 git fetch # update you local repo from the remote repo
 git checkout develop
 git pull
 git checkout feature/awesome-feature
 git rebase develop # This may arise merge conflicts that have to be solved

But why rebasing features branches is required? There are several reasons to it:

  • Makes it easier to track issues in the development branch, since this branch will have clear points where the feature branches where merged (see Merging feature branches).

Merging feature branches

 git checkout develop
 git merge --no-ff feature/awesome-feature # Creates merge commit


Previous: Methodologies Index Next: Methodologies/Project Cycles