General procedure is to follow the established GitFlow model.
Assuming the move happens right after 2.0.0 is released.
- All SVN tags moved in as Git Tags.
- Code SVN tagged as 2.0.0 moved to Git
master
branch - Git
master
branch is branched todevelop
.
If work after 2.0.0 has already been committed to SVN trunk
, then SVN trunk
is moved to Git develop
branch instead.
- All normal commits and pull requests made to
develop
branch. - If Joe Dev wants to address a simple bug or enhancement, they fork repo, create a branch on their repo, commit against that, and do a pull request back to develop branch. What Joe Dev calls his branch on his own repo is up to him. Branches created via the GitHub website will be called
patch-*
, but otherwise, recommendation is to stick withfeature/IssueNumber
orfeature/featurename
. - If it's a major feature or rewrite (especially from StudioPress folks), then a
feature/featurename
branch should be created from thedevelop
branch. Once the feature is deemed complete, then it can be merged intodevelop
. This means that if the feature is punted or scrapped, no reversing needs to be done ondevelop
. - Consider recommending that all multi-commit branches are squashed into a single (or few if large) atomic commit, since it makes tracking the overall changes to Genesis far easier (i.e. the addition of HTML5 to Genesis, or the CSS re-org could be seen as a single commit, rather than 20+).
If a critical bug is found in a release (say 2.0.0) that warrants an urgent release (2.0.1), then the workflow is slightly different:
- Create a
hotfix/versionnumber
branch from themaster
branch. - Fix the bug[s].
- Proceed with release as below.
GitFlow says that up until this point, all of the develop
branch is just working on the next version, whatever that may be. In reality for Genesis, due to the unsemantic versioning, we know the next version after 2.0.0 will be 2.1.0, outside of any bug fix releases.
- When the code is deemed ready for a release, create a
release/releasenumber
branch from develop. (If releasing a hotfix, don't create a release branch but stay on thehotfix/*
branch) - Update the release timestamp, version number, database number, update functions, and whatever other pre-tag tasks Nathan does.
- When everything is completely done, merge into
master
AND intodevelop
. This should be the only time themaster
branch gets updated. - Create a tag from
master
branch.
- Keep the same branch naming format as GitFlow - no explanation is then needed for what branch is for what, for those with familiarity of GitFlow.
- All commits should include a reference to an Issue. If there's no issue, create it, so there's a place for further discussion or to group related commits. When committing to my feature branch, my commit message can reference an Issue on the Genesis repo, and that gets updated / closed automatically once my branch is merged.
- If adding a feature may need more than one commit, then that feature should be built in a
feature/*
branch, then merged intodevelop
when it's complete. That includes when the code is working but a check on the documentation would be beneficial before adding todevelop
, or when the CSS is being re-organized in stages etc.
That is 100% what I would recommend. Word for word. Branching, rebasing and merging will become second nature. Also good to know that there are quite a few apps out there that support this gitflow model such as Tower and SourceTree (both Mac apps btw)