Git & GitHub·Team workflow

Remotes and pull requests

Share work through a fork or branch and get it reviewed before merge.

Beginner 12 min read Lesson 12 of 480 Challenge included
What you will be able to do
  • Inspect and fetch from remotes
  • Push a branch with an upstream
  • Open and follow a pull request

A remote is a named copy of the repository. fetch downloads without touching your files; pull fetches and integrates. Pull requests turn a branch into a reviewable proposal.

pr.shTerminal
git remote -v
git fetch origin
git switch -c feature/search origin/main
git push -u origin feature/search
gh pr create --fill
gh pr checks --watch
  1. 01
    Branch from main

    Create a short-lived branch for one change.

  2. 02
    Push

    Publish the branch and set its upstream.

  3. 03
    Open a PR

    Describe the change and link the issue.

  4. 04
    Review

    Address comments with new commits, not force pushes.

  5. 05
    Merge

    Merge only after checks pass and approval is in place.

Your turn

Start from origin/main

Easy

Create feature/search from origin/main and push it with an upstream.

BASH · starter
# your commands here
Check your understanding before moving on.
Knowledge checkQuestion 1

What does git fetch do?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: Tags and releases
Lesson 12 of 480 · 0% of course