- go to your codes directory
- `cd ..`
- `git clone https://github.com/dwihdyn/lifeskill-be.git`
-
ignore this step if you create an environment already. else, go to terminal and run
- `conda create -n lifeskill-be python=3.7`
- `source activate lifeskill-be`
- move your codes to under 'lifeskill_web' directory
-
run below code in terminal
- `pip install -r requirements.txt`
- `pip freeze > requirements.txt`
- branch out `git checkout -b whateverFeatureYouAreBuilding`
- put your codes accordingly to the boilerplate, make sure it works as usual, by running `flask run`
- once working, continue build your feature
-
publish your codes into github
- `git add .`
- `git commit -m 'my feature - yourName'`
- `git push origin whateverFeatureYouAreBuilding`
- Carry on until you've perfected your feature, and ready to be merged to master
- (IMPORTANT !!!!!!!!!!!) : MAKE SURE you are in the right branch! Type `git branch`. if it show "whateverFeatureYouAreBuilding" in green color, you on the right track
- git checkout master
- git pull origin master # get all updates from the master that you've missed
- git checkout whateverFeatureYouAreBuilding
- git rebase master # put all of your features inside your branch on top of your master LOCAL
- git push origin whateverFeatureYouAreBuilding # upload your branch work + the updated master (to avoid conflict)
- Merge your branch to the master in github.com -> click 'n branches' -> 'New Pull Request'
Go to terminal and run :
if you stuck, let dwi know on slack
Remember to build one feature at a time! and good luck :)
=================================================================================
Some git command you can explore:
- `git branch` : see all available branches
- `git checkout branch-name` : change branch to branch-name
- `git fetch origin other-people-branch` : to put other people (in progress) code into your local computer