Initialize The CSXL Repository
On your host machine, as was started in class, follow these instructions:
- From VSCode, open a new Window
- Command Palette > Git Clone: https://github.com/unc-csxl/csxl.unc.edu.git
- After cloning DO NOT follow automated suggestions! FIRST:
- Open docs/get_started.md
- Follow Before Starting a DevContainer: Establish a .env File
- After starting the container, complete the getting started steps
Setup Team on GitHub Classroom
One member of the team should carefully create the team. Only one member needs to take this step first. Create a team named “EX01 NN” where the NN is the TEAM NUMBER of your group on the pairings page sent out via Canvas. Check it closely! Accept the assignment on behalf of your team and, after refreshing, it will create a repository at
github.com/comp423-24s/csxl-ex01-pomodoro-front-end-team-NN
. Assignment acceptance link: https://classroom.github.com/a/RDhFwB_EAfter completing Step 1, all other members of the team should join the correct team and accept the assignment to be added to the repository. Assignment acceptance link: https://classroom.github.com/a/RDhFwB_E
Add Team Remote to CSXL Repository
Be sure to clone into your team assignment repository! From this point onward, you should only be working in that repo, not the “main” CSXL repo.
In a terminal from the VSCode Devcontainer, let’s reconfigure our remotes: A.
git remote rm origin
- Removes the csxl origin remote B.get remote add origin <your team repo here>
- Adds your team’s repo as the new origin C.git push origin main
- Pushes to your team remo’s main branch (You should now see code show up on GitHub in your team project repo) D.git remote add upstream https://github.com/unc-csxl/csxl.unc.edu.git
- AddsFetch all branches from
upstream
and checkout:get fetch --all
git checkout --track upstream/comp423/ex01-pomodoro-frontend
Push the
comp423/ex01-pomodoro-frontend
branch to theorigin
remote (your team’s repository):git push origin comp423/ex01-pomodoro-frontend
Your team will work off of a staging branch named
stage
, rather than thecomp423/ex01-pomodoro-frontend
branch. Go ahead and establish astage
branch locally and push it:git switch --create stage
git push origin stage
Only one team member needs to do complete the steps above. However, since the .env file is specific to each repository, both members will need to recreate it before you can run the dev container! Refer back to the docs/get_started.md file as needed.
GitHub Repository Configuration
After the team repository has been initialized, setup the following repository branch settings in GitHub:
- Settings
- General > Default Branch > Change Branch to
stage
- Press the Swap Button (not the Pencil!) and select
stage
- If you do not see
stage
, be sure you completed all the steps in “Initialize Team Repository”, then refresh this page and try again.
- Press the Swap Button (not the Pencil!) and select
- Change to the Branches tab in the sidebar
- Add Branch Protection Rule to prevent any pushing to
comp423/ex01-pomodoro-frontend
- Branch name pattern:
comp423/ex01-pomodoro-frontend
- (Check) Lock branch
- (Check) Do not allow bypassing the above settings
- Save Changes with Create Button
- Add Branch Protection Rule to prevent any pushing to
- Add Branch Protection Rule to enforce a professional team workflow on
stage
- Branch name pattern:
stage
- (Check) Require a pull request before merging
- (Check) Require approvals: 1 required
- (Check) Dismiss stale pull request approvals when new commits are pushed
- (Check) Require approval of the most recent reviewable push
- (Check) Require conversation resolution before merging
- (Check) Require linear history
- (Check) Do not allow bypassing the above settings
- Save Changes
- Branch name pattern: