Subject: Re: Pull is Evil

From: Junio C Hamano <[email-masked]>
Date: Fri, 02 May 2014 12:29:48 -0700

Marc Branchaud <[email-masked]> writes:

> I may be mistaken, but I think "git pull" evolved to try to address the
> detached-HEAD risk (at least in part).

You are totally mistaken.

"git pull" was part of the things to make git usable by Linus before
1.0 release, and matches the integrator workflow perfectly well.
The detached HEAD came much much later.

The issue we are discussing with "git pull" is that if a non
integrator does a "git pull" from the upstream, in order to push the
result of integrating the local work with it back to the upstream,
by default "git pull" creates a merge in a direction that is wrong
when seen in the "first-parent chain is the trunk" point of view.

One way to solve that _might_ be to use the detached HEAD as you
illustrated in your long-hand in the thread that had Brian's
example, but that is not even a failed 'git push' recommends to do
to the users, and there was no link between how 'git pull' behaves
and use of detached HEAD at all.