# git pull unclear manual

5 messages from 2021-03-04 to 2021-03-07. Participants: Sergey Organov, Junio C Hamano.
Thread: https://gitlist.dev/t/55248

## Sergey Organov, 2021-03-03 14:18

Subject: git pull unclear manual
Message-ID: <874khsqq0o.fsf@osv.gnss.ru>
URL: https://gitlist.dev/e/874khsqq0o.fsf%40osv.gnss.ru

```
Hello,

Here is how "git help pull" begins:

<q>
NAME
       git-pull - Fetch from and integrate with another repository or a local
       branch

SYNOPSIS
       git pull [<options>] [<repository> [<refspec>...]]
</q>

From this, how do one figures how to "integrate with ... local branch"?

Is "git pull" useful to integrate with a local branch at all?

Thanks,
-- Sergey

```

## Junio C Hamano, 2021-03-04 01:18

Subject: Re: git pull unclear manual
Message-ID: <xmqqv9a7emx6.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqv9a7emx6.fsf%40gitster.c.googlers.com
In-Reply-To: <874khsqq0o.fsf@osv.gnss.ru>

```
Sergey Organov <sorganov@gmail.com> writes:

> Here is how "git help pull" begins:
>
> <q>
> NAME
>        git-pull - Fetch from and integrate with another repository or a local
>        branch
>
> SYNOPSIS
>        git pull [<options>] [<repository> [<refspec>...]]
> </q>
>
> From this, how do one figures how to "integrate with ... local branch"?
>
> Is "git pull" useful to integrate with a local branch at all?

Yes, you can refer to your local repository as ".", so

	git pull . another-branch

will integrate the history of your local "another-branch" into
the history of the branch you have currently checked out.



```

## Sergey Organov, 2021-03-04 11:52

Subject: Re: git pull unclear manual
Message-ID: <87blbzm901.fsf@osv.gnss.ru>
URL: https://gitlist.dev/e/87blbzm901.fsf%40osv.gnss.ru
In-Reply-To: <xmqqv9a7emx6.fsf@gitster.c.googlers.com>

```
Junio C Hamano <gitster@pobox.com> writes:

> Sergey Organov <sorganov@gmail.com> writes:
>
>> Here is how "git help pull" begins:
>>
>> <q>
>> NAME
>>        git-pull - Fetch from and integrate with another repository or a local
>>        branch
>>
>> SYNOPSIS
>>        git pull [<options>] [<repository> [<refspec>...]]
>> </q>
>>
>> From this, how do one figures how to "integrate with ... local branch"?
>>
>> Is "git pull" useful to integrate with a local branch at all?
>
> Yes, you can refer to your local repository as ".", so
>
> 	git pull . another-branch
>
> will integrate the history of your local "another-branch" into
> the history of the branch you have currently checked out.

Nice, thanks!

Do you think the manual needs some improvement still?

I mean, I'd then expect something like this as the SYNOPSIS:

"git-pull - Fetch from and integrate with another or current repository"

with further clarification in the DESCRIPTION of how integration with
current repository could be useful.

The present description, if we drop "another repository" for the sake of
the argument, reads:

"git-pull - Fetch from and integrate with a local branch"

that sounds plain wrong to me.

Also, I got confused further as the manual consistently uses "remote
repository" to describe <repository>, and that doesn't easily maps to
"current repository" in my mind.

Further, the manual says that <refspec> is simply passed to the "git
fetch", and "git help fetch" adds to the confusion, as it says:

  git-fetch - Download objects and refs from *another repository*
  
  Fetch branches and/or tags (collectively, "refs") from one or more
  *other repositories*, along with the objects necessary to complete
  their histories.

that doesn't suggest "current repository" in some form is allowed
either.

BTW, why are these "other", "remote", "another" attributes there in
the manual in the first place? Why don't just say:

  git-fetch - Download objects and refs from repositories
  
  Fetch branches and/or tags (collectively, "refs") from one or more
  repositories, along with the objects necessary to complete their
  histories, into the current repository.

Thanks,
-- Sergey

```

## Junio C Hamano, 2021-03-04 23:24

Subject: Re: git pull unclear manual
Message-ID: <xmqqy2f2biz5.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqy2f2biz5.fsf%40gitster.c.googlers.com
In-Reply-To: <87blbzm901.fsf@osv.gnss.ru>

```
Sergey Organov <sorganov@gmail.com> writes:

> Do you think the manual needs some improvement still?

My reading is already tainted by using Git for a long time, so I
won't be the best person to judge what's missing in the manual.

> I mean, I'd then expect something like this as the SYNOPSIS:
>
> "git-pull - Fetch from and integrate with another or current repository"
> ...
>   git-fetch - Download objects and refs from *another repository*

Just replacing "another repository" with "a repository", the latter
of which includes the current one, would be sufficient, perhaps?


```

## Sergey Organov, 2021-03-07 18:57

Subject: Re: git pull unclear manual
Message-ID: <87y2eyg5b6.fsf@osv.gnss.ru>
URL: https://gitlist.dev/e/87y2eyg5b6.fsf%40osv.gnss.ru
In-Reply-To: <xmqqy2f2biz5.fsf@gitster.c.googlers.com>

```
Junio C Hamano <gitster@pobox.com> writes:

> Sergey Organov <sorganov@gmail.com> writes:
>
>> Do you think the manual needs some improvement still?
>
> My reading is already tainted by using Git for a long time, so I
> won't be the best person to judge what's missing in the manual.
>
>> I mean, I'd then expect something like this as the SYNOPSIS:
>>
>> "git-pull - Fetch from and integrate with another or current repository"
>> ...
>>   git-fetch - Download objects and refs from *another repository*
>
> Just replacing "another repository" with "a repository", the latter
> of which includes the current one, would be sufficient, perhaps?

Yeah, just "a repository" is fine with me, perhaps followed by a note in
the DESCRIPTION that the current one is indeed included.

-- Sergey

```
