Current git branching model is GitFlow. In case you are not familiar with this branching model, several introductory articles are available online1 2.
Users of Microsoft Visual Studio can use GitFlow for Visual Studio 2017.
"We consider
origin/master
to be the main branch where the source code ofHEAD
always reflects a production-ready state."1
"We consider
origin/develop
to be the main branch where the source code ofHEAD
always reflects a state with the latest delivered development changes for the next release."1
"The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into develop (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment)."1
New features are developed in individual feature branches that start from the develop branch.
- When starting work on a new feature, please create individual feature branch from the current develop branch. It is recommended to push your feature branch to origin.
- Develop feature, documentation, tests, ...
- The feature in feature branch is completed.
- Update your feature branch by merging current develop branch to your feature branch. Solve possible merge conflicts.
- Push successfully updated feature branch to origin.
- Submit pull request for merging your feature branch to develop branch,
therefore
origin/feature/my-work
toorigin/develop
.
Based on the above described GitFlow, it is advised not to commit any changes to the master branch during daily development.
Footnotes
-
A successful Git branching model URL: http://nvie.com/posts/a-successful-git-branching-model/ ↩ ↩2 ↩3 ↩4
-
git-flow cheatsheet URL: https://danielkummer.github.io/git-flow-cheatsheet/ ↩