Contents
What is GitFlow model?
What is Gitflow? Giflow is an alternative Git branching model that involves the use of feature branches and multiple primary branches. It was first published and made popular by Vincent Driessen at nvie. Compared to trunk-based development, Giflow has numerous, longer-lived branches and larger commits.
What are the main branches in GitFlow?
A Git flow has five types of branches:
- The production branch.
- The develop branch.
- Feature branches.
- Release branches.
- Hotfix branches.
What is the difference between tag and branch?
Both branches and tags are essentially pointers to commits. The big difference is that the commit a branch points to changes as you add new commits, and a tag is frozen to a particular commit to mark a point in time as having a certain significance.
Should a release branch or the master branch be tagged?
Some indicate that a tag needs to be created from the master branch while others prefer the release branch. According to the gitflow picture: it looks like that the tag is placed on the master. Firstly, you can’t tag branches, you can only tag commits. You should tag the commit you actually release. That’s the point of version-tagging commits.
Why do you need a Git tag for a branch?
Git tags and branches are extremely lightweight notions, the only ( only) ( only) model you should have of a git history is the ancestry dag and references (tags, branches, what have you) to currently-particular commits in it. Why bother tagging a commit you can find just as (more, actually) reliably without the tag?
Can a merge commit to master be tagged in Git?
With Git, it is a commit, not a branch, that gets tagged. Depending on your workflow, the same commit could exist in both master and develop. However, given you have those two branches, it is likely that a (merge) commit to master signifies a release. In that case, the proper thing to do would be to tag that merge commit to master.
Which is the best branching model for GitHub?
For this, GitHub’s branching model, as mentioned by Chase works perfectly fine. If releasing involves some code changes (e.g. bumping version numbers, summarizing changelogs), one can do this directly on master or on a dedicated branch. In any case, master serves here as both, integration and stable branch.