This is a readme.md edit
Objectives: Practice the git workflow
-
Form a group of 2-3
-
Install git on your laptop/PC.
- For Linux: It's pre-installed
For Windows:
- install git for windows
- Then, when you need to type git commands, open git terminal (rather than standard command prompt)
For MacOS, open your terminal, then just follow lines below:
- Install Xcode command line first,
xcode-select --install
- Install Homebrew,
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- then, install git:
brew install git
-
I am giving you access to my team's Developer's git guide. It's simple way for you to know what to type in the terminal.
-
For each group, assign a maintainer. Then others would be considered as the contributors.
-
The maintainer would fork this repository first. (It's on the upper right beside star) as highlighted on the photo below:
-
Add access to your collaborators. Go to settings > Manage Access > Invite team or people. Then type their username
-
For this exercise, make sure that your collaborators have a Role:Maintain
On your group, assign who would work on the problems:
- factorial.c
- fibonacci.c
- sum.c
Make sure to follow the git workflow. Please check out Developer's git guide to determine what to type on your terminal.
You know that you're done when all of your codes are in the master branch.
Now, imagine after one week, one of you (contributor X) have formulated a better approach in solving factorial. However, here's the catch: He/she started doing the work when you haven't started Part 1. Therefore, it still doesn't contain the changes you've performed in Part 1. But, you want to merge as it's more efficient (it's in the part2 branch).
Make sure that you have your Developer's git guide
Step 1: Assign someone on who is contributor X. and who is the maintainer.
Step 2: Contributor X would send a pull request.
Step 3: Maintainer would review the code. And See that it is out-of-sync. - Maintainer comments out in the conversation to let contributor "rebase"
Step 4: Contributor X would rebase and force push (please check the guide)
Step 5: When it's already in sync, maintainer can comment his approval. Then merge it. (please check the guide)