From this blog post describing the git-flow model, it seems that feature branches have to remain local to the user working on them and are actually deleted right before pushing to origin
.
This kind of makes sense, but what if other people want to checkout my feature branch to help me out for example? Should I push my branch only then? Should I not? If so why?
1
Under the original gitflow specification, there is no requirement that features be local only, only that they SHOULD NOT be pushed to origin:
Feature branches typically exist in developer repos only, not in origin.
However, it’s not a hard requirement. The gitflow API supports publishing and tracking features on origin:
git flow feature publish <name>
Start sharing feature
<name>
on$ORIGIN
git flow feature track <name>
Start tracking feature
<name>
that is shared on$ORIGIN
It was not part of the original specification, but was silently added in gitflow 0.2 when it was refactored to be a git subcommand.