Skip to content

Instantly share code, notes, and snippets.

@devinschumacher
Created September 17, 2024 00:06
Show Gist options
  • Save devinschumacher/ea27f994d1be4e1cbf06f4735addae04 to your computer and use it in GitHub Desktop.
Save devinschumacher/ea27f994d1be4e1cbf06f4735addae04 to your computer and use it in GitHub Desktop.
How to do a "dry run" of a git merge to see what would happen without actually committing to it
title tags

How to do a "dry run" of a git merge to see what would happen without actually committing to it.

Example: You're on a branch called some-branch and you want to see how your branch compares to your local dev branch.

  1. First run a git diff to see the difference between your branches:
# git diff <other-branch> <current-branch>
$ git diff dev some-branch
git merge --no-commit --no-ff dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment