Matt Seymour

There is no built in git dry run option which is a shame as it is a feature I would use all the time. But there is a way to simulate this without polluting the git history.

Performing a git merge with no commit or no fast-forward will merge the two code bases together. This will allow you to examine, test, and undo the merge if required.

git merge --no-commit --no-ff <branch-name>

If you need to undo the commit you can use:

git merge --abort

This will return git to its state before the merge occurred.