# previewing "git pull"

1 messages from 2013-10-26 to 2013-10-26. Participants: Perry Hutchison.
Thread: https://gitlist.dev/t/35205

## Perry Hutchison, 2013-10-26 03:23

Subject: previewing "git pull"
Message-ID: <526b359e.dmR4kAHrnCsJVbAm%perryh@pluto.rain.com>
URL: https://gitlist.dev/e/526b359e.dmR4kAHrnCsJVbAm%25perryh%40pluto.rain.com

```
In git 1.7.0.4, what's the correct way to preview what a "git pull"
would do, without actually doing it?  Unlike most git subcommands,
pull seems not to understand --dry-run:

$ git pull --dry-run
sed: can't read {pathname suppressed}/.git/FETCH_HEAD: No such file or directory
You asked to pull from the remote '--dry-run', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.

Trying the "fetch" part of pull by itself, at least fetch doesn't
mistake --dry-run for a remote name, but it doesn't seem to
implement it either -- instead of a report of what it would do,
there's no output at all:

$ git fetch --dry-run
$

I'm guessing that I may need to actually do the fetch in order
for git to know what the remote has, but then how would I find
out exactly what merge command "pull" would have issued (so as
to try adding --dry-run to it)?

```
