The Standard Workflow
Contributing to open source follows a specific pattern because you don't have permission to write directly to the main repository.
1. Fork & Clone
A. Fork on GitHub
Click the "Fork" button. This creates a copy on your account.
B. Clone to Local
# Clone YOUR fork, not the original!
git clone https://github.com/YOUR-USERNAME/project.git
cd projectC. Add Upstream
Link to the original repo so you can get updates.
git remote add upstream https://github.com/ORIGINAL-OWNER/project.git
git remote -v # Should show origin AND upstream2. Branch & Code
NEVER commit to main! Always create a new branch for every feature or bug fix.
# 1. Get latest changes from original repo
git checkout main
git pull upstream main
# 2. Create your feature branch
git checkout -b fix-login-bug
# 3. Code, Add, Commit
git add .
git commit -m "Fix login button alignment"3. Push & PR
Push to YOUR Fork
git push origin fix-login-bugOpen Pull Request
Go to the Original Repository on GitHub. You'll see a yellow banner: "fix-login-bug had recent pushes". Click Compare & pull request.
Pro Tip: If the maintainer asks for changes, just make them locally, commit, and push again. The PR updates automatically!