Lesson 17 / 26
push, pull, fetch & Tracking
Sync commits with a remote, and set up upstream tracking branches.
push and pull
push sends your commits up; pull fetches and merges the remote's commits into your current branch.
git push origin main
git pull origin mainfetch vs pull
git fetch downloads new commits from the remote without merging them — safe to run anytime to just look. git pull is really fetch + merge in one step.
Tracking branches
-u links your local branch to a remote one, so future plain git push / git pull know where to go.
git push -u origin feature/login
# now just:
git push
git pull