📖 Notes
LESSON 29 OF 32
Git & GitHub
Tracking Your Code's History
Git tracks changes to your code locally; GitHub hosts that history remotely so you can collaborate — and so deployment platforms like Vercel and Railway can pull your latest commit automatically.
Version Control
The Core Workflow
📁
git init
Starts tracking a folder as a Git repository.
➕
git add
Stages changed files to be included in the next commit.
💾
git commit
Saves a snapshot of staged changes with a message.
☁️
git push
Uploads local commits to a remote repository, like GitHub.
Init → Commit → Push → Branch
bashgit init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/you/repo.git git push -u origin main # Feature branch workflow git checkout -b feature/login-page git add . git commit -m "Add login page" git push origin feature/login-page # then open a Pull Request on GitHub
✅
Why this matters for deployment
Lessons 30 and 31 connect Vercel/Railway directly to your GitHub repo — every
git push to main triggers an automatic redeploy, no manual upload required.