RidgeRun Developer Manual - Methodologies - Gitflow
WORK IN PROGRESS. Please Contact RidgeRun OR email to support@ridgerun.com if you have any questions. |
RidgeRun Developer Manual |
---|
Coding Styles |
Development Tools |
Editors |
Debugging Tools |
|
Profiling Tools |
Methodologies |
Design Patterns |
RidgeRun Developer Manual/Testing |
RidgeRun Developer Manual/Build Systems |
Contact Us |
About Gitflow Methodologies
A "gitflow" methodology is no more than a set of practices that define 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 A got his/her feature branch approved first than person B. Once person A merges the feature branch in the development branch, person A should tells person B that he/she needs to rebase his/her feature branch, so person B can follow these commands:
git fetch # update you local repo from the remote repo git checkout develop git pull git checkout feature/person-b-feature git rebase develop # This may arise merge conflicts that have to be solved
The following figure illustrates this process:
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).
- Each developer will have the latest code base in its local repo which implicitly allows for testing the feature that was originally developed in another system. Sometimes this helps find issues.
Merging feature branches
git checkout develop git merge --no-ff feature/awesome-feature # Creates merge commit