Here's our branch structure: **Main, Develop, Features and Fixes.**
-- The main branch is off limits for now. That's our live production branch
-- The develop branch is where we merge all our features/fixes/work together
-- The features branch is the one you would create for the feature you are working on.
-- The fix branch is the one you would create for the fix you are working on.
If this is your first time here, first clone this repository if not skip this step.
git clone https://github.com/Scrum-Team-C/Comic-Zone-Clientthen
cd Comic-Zone-ClientThese are the steps to take:
If you are working on a page/feature for e.g Cart,
-
Check out to develop branch (git checkout develop)
git checkout develop && npm i -
Create your own branch.
If you are working on a feature (e.g git checkout -b feature/cart), That command also checks out into the feature/cart branch.
git checkout -b feature/cartIf you are working on a bug fix (e.g git checkout -b fix/cartCountCorrection), That command also checks out into the fix/cartCountCorrection.
git checkout -b fix/cartCountCorrection-
Write your code, commit, and push to remote. I guess we know how to commit and push our codes.
-
When you are done with the feature and now want to merge to develop, check out to develop (git checkout develop)
git checkout develop
pull to make sure you have all current changes in develop (git pull origin develop)
git pull origin develop
Check out to your feature/cart branch if you worked on a feature, (git checkout feature/cart)
git checkout feature/cart
or your fix/cartCountCorrection branch if you worked on a fix, (git checkout fix/cartCountCorrection)
git checkout fix/cartCountCorrection
then merge in develop (git merge develop)
git merge develop
Fix possible merge conflicts, then push to remote (git push)
git push origin [your_local_branch_name]
-
Go on Github. Click create pull request.
-
Choose the branches you want to merge,
-
making sure that you're merging cart branch into develop. (please verify that the branch you want to merge to is develop. )
-
You can drop comments on the pull request. I will look at it and then merge it into develop
-
If you are experiencing any issues contact Adaobi or Charles or Ifechi