[PATCH v2] Re: push: point to 'git pull' and 'git push --force' in case of non-fast forward
- From
- Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
- Date
- Aug 8, 2009, 22:23 UTC
- Message-ID
- <20090808222333.GA12954@vidovic>
- In-Reply-To
- <7vy6pujmsc.fsf@alter.siamese.dyndns.org>
The 08/08/09, Junio C Hamano wrote:
Show 11 quoted lines
> Matthieu Moy <Matthieu.Moy@imag.fr> writes: > > Teemu Likonen <tlikonen@iki.fi> writes: > > > > Right, but I don't think this error message is the place to discuss > > that. Anything involving rebasing should be taken with care, and > > pointing the user to it in a short sentence sounds like "try shooting > > yourself in the foot, and read the man page if it hurts" ;-). > > Instead of saying "Merge in", we could say "Integrate" to cover both > practices. I also happen to think that the mention of --force falls into > the same category as "try shooting and then study if it hurgs".
I'd say that everywhere we try to guess what the user should do (and telling him to do so) falls into this category. Of course, some operations are really destructive with no way to recover to a previous state where some other operations aren't destructive at all. But Git can be used in many various workflows and telling ― in an error/warning message ― what the user should do may hurt some of the workflows and/or finally confuse the beginners. Actually, I believe that a message with only "See the /WONDERFULL/ section in the /LEARN_GIT/ man page" is the best answer.
Also, I think that mentionning --force is the worst thing to do because the beginner will immediatly run it without thinking of all the consequences at all: "Oh, we could do that, let's try".
Show 5 quoted lines
> So how about phrasing it like this? > > Non-fast forward pushes were rejected because you would discard remote > changes you have not seen. Integrate them with your changes and then > push again. See 'non-fast forward' section of 'git push --help'.
Well, a beginner may rewrite a commit whithout realize what he did. If he is the only to work on the projet, this message is somewhat wrong.
What about
Non-fast forward pushes were rejected because you would discard remote
changes. See 'non-fast forward' section of 'git push --help'.?
-- Nicolas Sebrecht