You now have two copies of your psy1903 repository:
Periodically and when you make notable changes to your local copy, you will need to “check in” those changes with the central copy that exists on Github.com so that everything remains in sync.
It will be important that things remain in sync, because when you share your code with classmates or instructors (for assistance or grading purposes), you will want to make sure they’re seeing the most up to date version of your work on Github.
Additionally, each check-in will contribute to your Git version control history which will keep track of what changes were made to your code base over time. This history can be useful to look back on. For example, imagine a scenario where a few days ago your code was working exactly as expected, but now after making some changes things have gone horribly wrong and you’re not sure why - if you have a good Git history, you can look back at the code when it was in a “working state” for reference. With Git, it’s even possible to revert a code base back to a previous state in the Git history which can be extremely helpful at times.
That’s all the “why” you’ll want to keep your repositories in sync and maintain a good Git history, let’s get into the “how”...
Any time you make a change to your local repository (changing code in a file, adding a new file, deleting a file, moving a file), Git will observe that change and you’ll see it listed in VSCode’s Source Control panel under Changes.
When you reach a point where you wish to check in (aka sync) your changes from your local repository to your central repository on Github, you need to complete these three steps:
Let’s see that process step by step.
First, make the following two changes to your code base:
Change 1 - Edit existing file
Update psy1903/README.md so the following line contains your name:
## Your Name Here
Change 2 - Add new file
Create a new file at psy1903/docs/projects/basics/app.js with this content:
console.log('Hello World!');
After completing the above changes, you should see both of the impacted files listed under Changes in the VSCode source control panel. Clicking on either of the files will load it in the editor and it will highlight the changes. Clicking on the plus + icon next to each file will stage (or add) those changes.
After clicking the plus + icon next to both files you changed, you should see this:

With your changes staged, you can now initiate a new new commit by filling in a commit message containing a brief summary of the changes, then click the Commit button:
Finally, click Sync Changes to push your commit(s) to your central repository on Github.com:
If you visit your repository on Github, it should match your local repository with the updated psy1903/README.md file and the addition of the psy1903/docs/projects/basics/app.js file. Furthermore, if you visit your commit history on Github, you can see a history of commits made to this repository so far.
With the above steps complete, we now see the process for keeping our local and central repositories in sync. You will repeat this process at notable points in your code writing process. For example:
All of the above suggestions on check-in best practices are appropriate for the context in which we’re working. If you were storing professional research work in a repository that you shared with collaborators, you might be more restrictive about the commits you make, waiting only until work was “production ready” before committing.
No subscriptions, no auto-renewals.
Just a simple one-time payment that helps support my free, to-the-point videos without sponsered ads.
Unlocking gets you access to the notes for this video plus all 200+ guides on this site.
Your support is appreciated. Thank you!