git fetch --dry-run

Preview remote changes without actually downloading them.

This command previews what updates your local repository would receive from the remote without actually fetching any objects.

By simulating the fetch process, it compares your local tracking branches with their remote counterparts and reports any new commits, tags, or branches that would be downloaded, all while leaving your refs and working tree unchanged so you can decide whether to proceed.

You can use the shorthand -n instead of --dry-run, specify a remote like git fetch origin --dry-run, include all configured remotes with git fetch --all -n, or run git pull --dry-run to simulate both fetching and merging.

Related commands

Welcome to GitExamples!

Sign in to enable bookmarking, reminders, progress-tracking and more...