Re: [PATCH] push: mention "git pull" in error message for non-fast forwards
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Aug 5, 2010, 13:14 UTC
- Message-ID
- <vpqiq3pp5gk.fsf@bauges.imag.fr>
- In-Reply-To
- <7vfwywk6lr.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes: > >> This reminds me: sometimes people blindly “git pull” a rebased history >> just to avoid a non-fast-forward push, and it irks me to no end. So if >> I were running the world, the output would be: >> >> error: rejected non-fast-forward push to '<url>' >> hint: To prevent you from losing history, non-fast-forward updates are >> hint: rejected by default. >> hint: See the 'Note about fast-forwards' section of 'git push --help' >> hint: for details. > > I actually like that ;-) > > Since we are discussing the "advice" part of the output, I don't think it > is so bad to add the three-bullet list below to it, either, though.
The error message is one that a normal user can see relatively regularly, as soon as he shares a bare-repository with co-workers, so I think it should remain short. That's why I took great care to remain within 3 lines in my patch.
Perhaps the manpage can be improved, but that's a separate topic. My one-line patch would make a great improvement for beginners, without harming advanced users, who still get the pointer to the doc.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/