CSCI 3342 Web Development
Spring 2025

JavaScript

git and GitHub

...taking your first step into a larger world.
Accept the GitHub Classroom repo invite to create a new (empty) repo for your assignment pages. Practice using the git command-line interface (CLI) to manage your project and submit it.

You'll need an account on GitHub, the dominant cloud-based source control solution

Some useful resources and explanations in the GitHub quickstart docs

Installation Guide for the git Command-Line Interface (CLI)
Repo invite for this assignment: https://classroom.github.com/a/eBjn6WcV

Prior class video

This video goes through using the git CLI with GitHub Classroom assignment repos (28:24). Two differences from then to now:
  1. I use git bash as my terminal in the video. These days I'd recommend just using cmd or PowerShell if you're in windows. If you want a linux environment in windows, use actual linux with the awesome WSL2.
  2. At that time, you had to manually create a Personal Access Token on GitHub to login. Now, when you do your first operation, git for windows brings up a browser to let you login to GitHub as normal. As long as that works, you can ignore the part about making a PAT. For server use or on some versions of linux and macos, you still need to create the PAT manually.
Browser authentication should work on windows, but as a reference: How to use Personal Access Tokens on GitHub

CLI Quick Reference

  • git clone <repo URL> to create a local copy
  • git status to see what has changed (do this before and after all the other commands!)
  • git add . to stage all changes you've made
  • git commit -m "a useful comment" to store your staged changes as a changeset
  • git push to upload all your changesets to GitHub

Assignment Checklist

Accept the repo invite
Generate a Personal Access Token
clone the repo and move your files into the working directory
commit and push your work
Confirm on the github website that your changes were uploaded