-
Notifications
You must be signed in to change notification settings - Fork 0
Git Flow
dyadyaJora edited this page Mar 25, 2019
·
7 revisions
Try to use classic git-flow process with some changes
-
dev
- main branch for development; current source code; all PR must go here; need reviews; need run CI; -
master
- stable version; must be deployable; need updates every week; -
staging
- branch with beta-code (dev-code); for autodeploy on test(beta) server;
- To create branches for the task you need from the branch
dev
. - Ready branches merge into
dev
. - Merging to
dev
ONLY via Pull Request:- Must be reviewed by 2 contributors
- CI passed
Using pattern [feature|bugfix|hotfix]/issue[number]_[branch-name]
How to check branch "first-name":
-
feature
- for enhancement/feature functionality -
bugfix
- for removing bugs in code -
hotfix
- inly for critical bugs
Example:
feature/issue1_back-sockets
bugfix/issue2_front-assembly
hotfix/issue3_xss-inject
Cloning via https
git clone https://github.com/itmo-cet-sem/franky.git .
cd ./franky
Cloning via ssh
git clone [email protected]:itmo-cet-sem/franky.git .
cd ./franky
How to run project - read in README.md
Before start: git fetch --all git checkout dev git pull origin dev
Start:
-
git checkout dev
checkout in "fresh" dev -
git checkout -b [branch-name]
create new branch for task - codding
git add [files]
git commit -m "[commit message]"
- while task not ready repeat from
3.
- git push origin [branch-name]
- open PR
Before merge(resolve conflicts with rebase):
git co [your-branch-name]
git fetch --all
git rebase origin/dev
- fix conflicts
git rebase --continue
- while have conflicts repeat from
4.
-
git push origin +[your-branch-name]
force push
Merge:
- Using github button after success PR
- or
git checkout dev && git merge [your-branch-name]
(restricted)
After merge:
- Delete branch with github
- or
git push origin --delete [your-branch-name]
@todo