Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Latest commit

 

History

History
98 lines (71 loc) · 4.93 KB

git-workflow.md

File metadata and controls

98 lines (71 loc) · 4.93 KB

Git Workflow

Git Wokflow

Branching Rules

Branch Server Comments
master Production Don't commit directly to master. Make a PR from release/x.x.x to master.
staging Staging Don't commit directly to staging. Merge release/x.x.x to staging and test the changes.
develop Development Feel free to deploy your fix/feature to develop and test the changes.
release/x.x.x To make a stable release Use semantic versioning. Create a new release branch from the previous release/x.x.x or master. Make sure to tag after release.
fix/issue_number To make a fix Create a new branch from the master or latest release/x.x.x. Test on develop and make PR against upcoming release branch.
hotfix/issue_number To make a hotfix Create a new branch from the master. Follow the project specific git flow to deploy it.
feature/issue_number To work on new feature Create a new branch from the master or latest release/x.x.x. Test on develop and make PR against upcoming release branch.
feature/feature_name When you have sub issues Make feature/feature_nameas the main branch. And create PR against that branch from separate issue/issue_number branches.

For more, visit http://nvie.com/posts/a-successful-git-branching-model/

Easy instruction

Overall Steps

  • Go to your local project directory cd YOUR_PROJECT_DIR
  • Checkout to the master branch git checkout master
  • Pull the latest changes from the master branch git pull origin master
  • Create a new branch for the feature you want to implement git checkout -b feature/your-new-feature
  • Add the changed files to the git git add .
  • Commit the changes to the git git commit -m 'Your commit message'
  • Push the commit to the git. [Make sure to specify the branch name otherwise it'll update all branches] git push origin feature/your-new-feature
  • Checkout to the develop branch git checkout develop
  • Pull the latest changes from the develop branch git pull origin develop
  • Merge your branch to the develop branch git merge your-new-feature
  • Push the merge commit to the develop branch. git push origin develop
  • Deploy the changes to the develop server.
  • Check your feature on the develop server.
  • If everything is alright, open a pull request against the new release branch. If the release isn't available to open against the master branch.
  • If it's not ok, then checkout again to your branch and do the above steps. Keep in mind, you don't need to recreate your feature branch as it already exists.

Tips

Pull Request template

Please use the following template to make a Pull Request.

## Description

Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.

Fixes # BACKLOG_ISSUE_KEY

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation/README.md/CHANGELOG.md
- [ ] I have checked my code and corrected any misspellings

References