Git Operation Specification
Now
all the bugfix are commit direct to ‘bugfix’ branch, all members commit in the same branch. it make the commit history unreadable and everyone have to pull&merge others’s code which is not the current work in their hand frequently and make git hard to handle.
How to change
Use Github Flow
- Update master to latest upstream code
- Create a feature branch from master branch
git checkout -b feature/myFeatureBranch
- Do the feature/work
- Push feature branch to origin
- Create pull request from origin/ -> upstream/master
- Review, fix raised comments, merge your PR or even better, get someone else to.
The main rule of GitHub Flow is that master should always be deployable.
Automatic Deploy For Test
- set github project hook
- commit pr to develop branch, tigger github project hook
- the hook send request to an url to the deploy server: jenkin or program you build.
- the deploy server pull the newest code and restart server
- test!
deploy to production
- commit pr to master
- others review the pr
- merge pr
- deploy to production
Name Rule:
Bugfix: bugfix/fix_xxxx
Feature: feature/add_xxx
if your project contains frontend and backend.
Frontend: add frontend/ , such as: front/bugfix/fix_xxxx
Backend: add backend/ , such as: backend/bugfix/fix_xxxx
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 JIE's Blos!