git fetch vs git pull: what's the difference?
git fetch downloads new commits from GitHub into origin/main but leaves your branch and files alone. git pull does a fetch and then merges origin/main into your branch.
Step by step
Download the news, change nothing:
$ git fetchSee what changed on GitHub:
$ git log main..origin/mainMerge it into your branch:
$ git merge origin/mainOr do both at once:
$ git pull
origin/main is your computer's memory of GitHub's main. It only moves when you fetch, pull or push.