-
-
Notifications
You must be signed in to change notification settings - Fork 5
Git flow cheatsheet
git flow init
Start using git-flow by initializing it inside an existing git repository.
This only needs to be run once per repo when you clone it.
You'll have to answer a few questions regarding the naming conventions for your branches. It's recommended to use the default values.
git flow feature start MYFEATURE
This action creates a new feature branch based on 'develop' and switches to it.
git flow feature finish MYFEATURE
Finish the development of a feature. This action performs the following:
- Merges MYFEATURE into 'develop'
- Removes the feature branch
- Switches back to 'develop' branch
git flow feature publish MYFEATURE
Are you developing a feature in collaboration?
Publish a feature to the remote server so it can be used by other users.
git flow feature pull origin MYFEATURE
Get a feature published by another user.
You can track a feature on origin by using:
git flow feature track MYFEATURE
git flow release start VERSION
To start a release, use the git flow release command. It creates a release branch created from the develop
branch.
git flow release finish VERSION
Finishing a release is one of the big steps in git branching. It performs several actions:
- Merges the release branch back into
master
- Tags the release with its name
- Back-merges the release into
develop
- Removes the release branch
Don't forget to push your tags with:
git push origin --tags
git flow hotfix start VERSION
The version argument hereby marks the new hotfix release name.
git flow hotfix finish VERSION
By finishing a hotfix it gets merged back into develop and master. Additionally, the master merge is tagged with the hotfix version.
Source here