Lab 2.1 - Saving (Pushing) To GitHub
Objective
Push our code to GitHub using the command line interface. We've done a bit of work now and want to make sure we have a good backup. GitHub is the place where we'll store that backup.
Instructions
There are several steps here, so I want you to practice with them for now without worrying about the details of what is happening here. Don't worry, we'll get there soon enough!
-
Open your project in Codespaces and use the terminal at the bottom of the development window to enter the commands below.
-
Add all changed and new files to the list of things that we want to back up.
$ git add .
-
Confirm that the list of new and changed files are the ones you want to back up and add a descriptive comment to help you remember what you changed or added.
$ git commit -m "Adding Unit 1 Lab 2"
-
Send your changes and new files to GitHub.
$ git push
-
Go to GitHub and find your projects repository that was created as part of Lab 1 when you accepted the assignment in GitHub Classroom.
-
Explore the files in your repository on GitHub to verify any new files and changes are there.
Tip
Every time you complete work that you don't want to lose, you should "add, commit, push" to back up your code!
Info
You should have many commits: at least 25-30 per unit. Do not wait to add, commit, and push until your lab is working 100%, instead, make it habit to commit after adding just a small bit of code.
Verify GitHub
To receive credit for this lab verify all work, including screenshots are visible in GitHub. Be sure to go to GitHub.com and make sure everything is there. If you can't see your work at GitHub.com, neither can your instructor!
Lab 3 has additional instructions for letting your instructor know when your week 2 work is complete.
Rubric
All of the following must be satisfied to achieve a "Met" status
- All work is visible in GitHub.