Skip to content
  • Merging & PRs · Git & GitHub

Merging & PRs

LearnViaNotes @learnvianotes· 1 min read

Integrating isolated branches and requesting code reviews on GitHub.

Comparing Changes

To view the difference in code content between two branches, commits, or staging areas before merging, use:

Shell
git diff feature-branch main

Merging Locally

To integrate changes from a feature branch into your active branch (e.g., merging feature-login into main), run:

Shell
# 1. Switch to the recipient branch (main)
git checkout main

# 2. Merge changes from the target branch
git merge feature-login

Pull Requests (PRs)

Fast-Forward vs Three-Way Merge

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report