I recommend the 'AVH' edition, which has more features and is actively maintained
https://github.com/petervanderdoes/gitflow
brew install git-flow-avh
Don't forget the fish completions!
https://github.com/bobthecow/git-flow-completion
See /sysadmin/fish/completions/git.fish
https://github.com/petervanderdoes/gitflow/wiki
Create branches for you;
git flow init
To accept all defaults (wise);
git flow init -d
git flow feature start {{name}}
git checkout develop
git pull
git rebase develop feature/{{name}}
Sync as above
Tweak and tidy git history
git flow feature finish --no-ff {{name}}
git checkout develop
git push
Ensure all changes are summarised within /CHANGELOG.md
under Unreleased
.
Group changes to describe their impact;
- Added - New feature added
- Changed - Stable feature changed
- Deprecated - Stable feature removed
- Removed - Deprecated feature completely removed
- Fixed - Include description of bug fixed
- Security - Include description of vulnerability fixed
Order changes within each group from high impact to low impact.
Decide on a new semantic version number based on the changes.
Increment the;
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
The remaining documentation refers to {{version}}
, which must include a 'v' prefix and two dots.
git flow release start {{version}}
Within /CHANGELOG.md
, change the 'Unreleased' heading to the new version number and release date.
Update the version number in /package.json
.
git add -A
git commit -m "Prepare {{version}}"
git flow release finish {{version}}
git push --tags
git checkout master
git push
git checkout develop
git push
git checkout develop
@TODO - Perhaps prematurely increment the minor version, and append a '-dev'? This would mean anything referring to the version will at least get a different version than the official one.
Add the following heading just above the new version within /CHANGELOG.md
Unreleased
----------
This encourages change log activity during development.
git add CHANGELOG.md
git commit -m "Prepare next development version"
git push
See Semantic Versioning: http://semver.org/
git flow hotfix start {{version}}
git flow hotfix finish {{version}}
git checkout master
git push
git checkout develop
git push