Re: Bug/Weird behaviour with git pull

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Berat,

Your email contains HTML, the rules of verg.kernel.org explain very
clearly that you must send only plain text:

    All email sent to there must be TEXT/PLAIN.

http://vger.kernel.org/majordomo-info.html

On Mon, Apr 17, 2023 at 9:02 AM Berat Özdemir
<Berat_Oezdemir@xxxxxxxxxxxxx> wrote:

> what you're writing is the expected behaviour of git pull. In my case origin/f1 equals local f1 so git pull should not change anything at all

I think you misunderstand the purpose of `git pull` (as most people
do): it's *not* meant to update your local branches.

The purpose of `git pull` is to integrate pull requests.

It's irrelevant if your local "f1" equals "origin/f1", because the
command is essentially the equivalent of doing:

    git fetch origin
    git merge origin/f1

If you are following a feature branch workflow (and it seems you are),
then `git pull` should only be used by the mainter to integrate pull
requests (usually into "master").

If what you want instead is to update your local branches, I suggest
to do something like:

    git fetch origin
    git switch f1
    git merge origin/f1
    git switch f2
    git merge origin/f2
    ...

Cheers.

-- 
Felipe Contreras




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux