threads / discuss / 14288

no --dry-run to git-pull ?

Subject: no --dry-run to git-pull ?

## tl;dr

4 messages between Jul 4, 2008 and Jul 4, 2008.

replies: 3people: 2as markdown or json

Miklos Vajna· Jul 4, 2008, 13:59 UTC · re: Neshama Parhoti · lore

Re: no --dry-run to git-pull ?

On Fri, Jul 04, 2008 at 04:56:27PM +0300, Neshama Parhoti <pneshama@gmail.com> wrote:
> Isn't there a way to do a --dry-run with git-pull ?

Not really. But you can do a 'git fetch origin', then a 'git log master..origin/master', and it'll tell you what changes will be merged if you do a 'git merge origin/master'.

NOTES:
1) Replace origin and master with your repomte and branch.
2) If this sounds cryptic for you, then it might be an important info
that by default a pull is a fetch + a merge.
Neshama Parhoti· Jul 4, 2008, 15:26 UTC · re: Miklos Vajna · lore

Re: no --dry-run to git-pull ?

On Fri, Jul 4, 2008 at 4:59 PM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 13 quoted lines
> On Fri, Jul 04, 2008 at 04:56:27PM +0300, Neshama Parhoti <pneshama@gmail.com> wrote:
>> Isn't there a way to do a --dry-run with git-pull ?
>
> Not really. But you can do a 'git fetch origin', then a
> 'git log master..origin/master', and it'll tell you what changes will be
> merged if you do a 'git merge origin/master'.
>
> NOTES:
>
> 1) Replace origin and master with your repomte and branch.
>
> 2) If this sounds cryptic for you, then it might be an important info
> that by default a pull is a fetch + a merge.

What puzzles me is the origin keyword. Is it set only if I initially cloned a repo ? Because in my case, I have just rsync'ed a repo to another station, so I fear it will have no meaning in my case. Thank you

>
Miklos Vajna· Jul 4, 2008, 15:29 UTC · re: Neshama Parhoti · lore

Re: no --dry-run to git-pull ?

On Fri, Jul 04, 2008 at 06:26:02PM +0300, Neshama Parhoti <pneshama@gmail.com> wrote:
Show 9 quoted lines
> > 1) Replace origin and master with your remote and branch.
> >
> > 2) If this sounds cryptic for you, then it might be an important info
> > that by default a pull is a fetch + a merge.
> 
> What puzzles me is the origin keyword. Is it set only if I initially
> cloned a repo ?
> Because in my case, I have just rsync'ed a repo to another station, so
> I fear it will have no meaning in my case.

Heh. git remote add -f origin <url>, then you'll have it. And yes, you have it if you cloned the repo, of course rsync won't add it. ;-)

← back to recent threads