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/f1If 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