git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug/Weird behaviour with git pull

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 17, 2023, 16:21 UTC
Message-ID
<CAMP44s3JmrLuh7_JCSPmQajVMfYQ5xZ2VRZoB=eYO7xdwqqavA@mail.gmail.com>
In-Reply-To
<AS8P194MB157539251684168156C0EC99E29C9@AS8P194MB1575.EURP194.PROD.OUTLOOK.COM>
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@deichmann.com> 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
Previous: Junio C Hamano
Message 6 of 6 in “Bug/Weird behaviour with git pull”
  1. Berat ÖzdemirApr 17, 2023
  2. Kristoffer HaugsbakkApr 17, 2023
  3. AW: Bug/Weird behaviour with git pullBerat Özdemir, Apr 17, 2023
  4. Felipe ContrerasApr 17, 2023
  5. Junio C HamanoApr 17, 2023
  6. Felipe ContrerasApr 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.