Welcome to Work on GitHub From Two Computers! This course is about sharing one project between computers, like teams do. Two computers sound like twice the freedom, until both of them are sure they have the latest version.
The store posts its deals from the back-office computer while you work on Generic Grocery Co.’s website on your laptop. So this week, the site moves to GitHub, and each computer gets its own copy. Quick fixes come from GitHub’s web editor, as if from your phone. You play the back office and the web editor, standing in for someone else pushing. The week’s work arrives as five issues on GitHub, right before Thanksgiving:
- Add next week’s deals
- Add the deli counter’s hours to the departments page
- Close at 1 p.m. on Thanksgiving
- Open at 8 a.m. on Thanksgiving
- Mark bananas down to 49¢ a pound
By the end of the week, your laptop and another copy will have changed the site at the same time twice, and a merge will have joined their work each time. A revert will have undone a quick fix that hit the wrong line, and the right fix will have followed it. Then every check in the project’s report passes.
What You’ll Learn
By the end of this course, you’ll be able to:
- Put a project on GitHub
- Set up a fresh clone with npm ci, like the back-office copy, and push and pull safely when someone else pushes too
- Resolve a merge conflict and revert a pushed change
In the final project, you handle the Thanksgiving week on your own. The project’s check script reports on your repository, and the mentor reviews how you resolved the conflict.
Before You Start
You should know how to commit, branch and merge with Git and how to run a Vite project with npm. You also need a free GitHub account.
The next lesson shows two ways to get the store’s site with its whole history. You can download it as a ZIP or, if you finished the course before this one, use your own repository. At the end of the course, a code download has the finished site.
How the Course Works
Most lessons are text that you follow along with in your own project, plus short videos and quizzes. A refused push and a conflict are part of the plan, and you fix each one on the spot.
Next, you’ll pick up the store’s site.