RidgeRun Developer Manual/Methodologies/Gitflow: Difference between revisions
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
But why rebasing features branches is required? There are several reasons to it: | 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 [https://developer.ridgerun.com/wiki/index.php?title=RidgeRun_Developer_Manual/Methodologies/Gitflow#Merging_feature_branches]). | *Makes it easier to track issues in the development branch, since this branch will have clear points where the feature branches where merged (see [https://developer.ridgerun.com/wiki/index.php?title=RidgeRun_Developer_Manual/Methodologies/Gitflow#Merging_feature_branches Merging feature branches]). | ||
=== Merging feature branches === | === Merging feature branches === |
Revision as of 15:27, 3 November 2020
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 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 # Create merge commit