threads / rfc / 55683

[RFC doc] Tracking git.git

Subject: [RFC doc] Tracking git.git

## tl;dr

4 messages between May 13, 2021 and May 13, 2021.

replies: 3people: 4as markdown or json

Bagas Sanjaya· May 13, 2021, 13:05 UTC · lore
Hi,

Some people (most notably Git developers here and me) like to run Git compiled from git.git repository, as opposed to normal users that run either Git from distribution or compiled from official source tarball.

In git.git repo, besides master, there is also next, seen, and maint branches. The purposes of these branches are described on Documentation/howto/maintain-git.txt.

When we have git.git repo clone and track it, tracking master, next, and maint are easy peasy: git pull will do the job. But tracking seen is more like tracking linux-next. We do NOT use git pull because often doing so will try to merge origin (upstream) with our local version, which are divergent and most likely will end with conflict. Instead, we do git fetch first followed by resetting to upstream by git reset --hard origin/seen.

Should the fact above be documented? And on what file the fact should be placed? In INSTALL?

-- 
An old man doll... just what I always wanted! - Clara
dwh@linuxprogrammer.org· May 13, 2021, 14:49 UTC · re: Bagas Sanjaya · lore

Re: [RFC doc] Tracking git.git

On 13.05.2021 20:05, Bagas Sanjaya wrote:
Show 8 quoted lines
>But tracking seen is more like tracking linux-next. We do NOT use git
>pull because often doing so will try to merge origin (upstream) with
>our local version, which are divergent and most likely will end with
>conflict.  Instead, we do git fetch first followed by resetting to
>upstream by git reset --hard origin/seen.
>
>Should the fact above be documented? And on what file the fact should
>be placed? In INSTALL?

I vote yes. I was trying out tracking the different branches and got bitten by this very situation (tons of conflicts) when pulling seen.

Cheers! Dave

Junio C Hamano· May 13, 2021, 20:12 UTC · re: dwh@linuxprogrammer.org · lore

Re: [RFC doc] Tracking git.git

dwh@linuxprogrammer.org writes:
Show 12 quoted lines
> On 13.05.2021 20:05, Bagas Sanjaya wrote:
>>But tracking seen is more like tracking linux-next. We do NOT use git
>>pull because often doing so will try to merge origin (upstream) with
>>our local version, which are divergent and most likely will end with
>>conflict.  Instead, we do git fetch first followed by resetting to
>>upstream by git reset --hard origin/seen.
>>
>>Should the fact above be documented? And on what file the fact should
>>be placed? In INSTALL?
>
> I vote yes. I was trying out tracking the different branches and got
> bitten by this very situation (tons of conflicts) when pulling seen.

I vote checking for existing docs before doing this, though. I would be surprised if we do not say "do not build on (fork from) 'seen' (formerly known as 'pu')".

Felipe Contreras· May 13, 2021, 22:47 UTC · re: dwh@linuxprogrammer.org · lore

Re: [RFC doc] Tracking git.git

dwh@ wrote:
Show 12 quoted lines
> On 13.05.2021 20:05, Bagas Sanjaya wrote:
> >But tracking seen is more like tracking linux-next. We do NOT use git
> >pull because often doing so will try to merge origin (upstream) with
> >our local version, which are divergent and most likely will end with
> >conflict.  Instead, we do git fetch first followed by resetting to
> >upstream by git reset --hard origin/seen.
> >
> >Should the fact above be documented? And on what file the fact should
> >be placed? In INSTALL?
> 
> I vote yes. I was trying out tracking the different branches and got
> bitten by this very situation (tons of conflicts) when pulling seen.
git pull is evil.

For more than a decade we've had unending debates about how to fix it, and nothing comes out of them (last one being [1]).

Just don't use it, and tell your friends to not use it.
Always do `git fetch` plus either one of these:
 1. git merge --ff-only
 2. git rebase
 3. git merge --no-ff
 4. git reset --hard @{upstream}
Cheers.
[1] https://lore.kernel.org/git/20201208002648.1370414-1-felipe.contreras@gmail.com/
-- 
Felipe Contreras

← back to recent threads