Git & GitHub for Developers GitHub: Remote Repos & Pull Requests
7 / 11
Next
GitHub: Remote Repos & Pull Requests ~14min

GitHub: Remote Repos & Pull Requests

GitHub is where your code lives online. Pull Requests (PRs) are how teams review and merge code safely.

Connecting to GitHub

# Push existing repo to GitHub
git remote add origin https://github.com/you/repo.git
git branch -M main
git push -u origin main

# Clone an existing repo
git clone https://github.com/you/repo.git
cd repo

The Pull Request process

  1. Push your branch to GitHub
  2. GitHub shows "Compare & pull request" button, click it
  3. Write a description: what changed and why
  4. Request reviewers
  5. Reviewers comment β†’ you push more commits to address feedback
  6. Approved β†’ Merge PR β†’ Delete branch

GitHub features to know

  • Issues, bug reports, feature requests, tasks
  • Actions. Automated CI/CD (run tests on every push)
  • Pages, free static site hosting from a repo
  • Releases, tag versions of your software
  • Fork, copy someone's repo to your account to contribute to open source
Tasks
Preview