Module 4 · ~35 min
Add & edit code
Goal: Put project files on GitHub using the web UI and your own computer.
Method A — Upload on GitHub.com
- Add file → Upload files → drag files → commit to
main.
Good for small updates. For daily coding, use Method B.
Method B — Clone, edit, push (recommended)
- Confirm Git:
git --version - Copy HTTPS URL from the green Code button.
- Clone and enter the folder:
git clone https://github.com/<username>/<repo>.git
cd <repo>
- Edit in VS Code, then push:
git status
git add .
git commit -m "Describe what you changed"
git push origin main
Good file habits
- Keep a useful
README.md. - Never commit passwords, API keys, or
.envfiles. - Commit often with clear messages.
Checklist
- I uploaded or cloned files successfully
- I made an edit and see it on GitHub
- My README describes the project
- I know not to commit secrets