Summary: Work on GitHub From Two Computers

When this course began, Generic Grocery Co.’s site and its whole history lived in one folder on one laptop, a spilled coffee away from being gone. Now the site is on GitHub, a second copy runs on the store’s back-office computer, and the week’s five issues are closed by the commits that did the work. The laptop, the back office, and GitHub all end the week with the same history.

In this summary, you’ll look back at how the week went and at the habits you picked up along the way. They’re written as the questions you’ll keep asking, so you can come back to this page whenever a push, a pull, or a conflict leaves you unsure.

Look Back at the Week

You created an empty, public repository for the store on GitHub, with your own history ready to fill it. A README added on GitHub would have given the repository a first commit that your laptop’s history didn’t have, and your first push would have failed. git remote add origin gave your laptop a short name for the repository’s address, and git push -u origin main sent all of the history and connected your main to origin/main.

GitHub refused your account password for that push because it doesn’t accept passwords for Git operations. So you created a fine-grained token that expires after 30 days and can only change the contents of one repository.

A credential helper now remembers it on your computer, and you know how to regenerate an expired token and delete a leaked one.

You filed the week’s work as issues, which live only on GitHub and never in a clone. Then you cloned the repository a second time to stand in for the back office. The clone brought every commit and every branch, but not node_modules/ or .env, so the site worked there only after you ran npm ci and created .env from .env.example.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.