Updating a local repository with changes from a GitHub repository

Question

I've got a project checked locally from GitHub, and that remote repository has since had changes made to it. What's the correct command to update my local copy with the latest changes?

Answer

Probably:

was: git pull origin master

now: git pull origin main

Receiving "fatal: Not a git repository" when attempting to remote add a Git repo

How can I switch to another branch in git?