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

  1. 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)

  1. Confirm Git: git --version
  2. Copy HTTPS URL from the green Code button.
  3. Clone and enter the folder:
git clone https://github.com/<username>/<repo>.git
cd <repo>
  1. 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 .env files.
  • 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