Re: [PATCH v2] push: point to 'git pull' and 'git push --force' in case of non-fast forward
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Aug 9, 2009, 18:35 UTC
- Message-ID
- <vpq63cwdee3.fsf@bauges.imag.fr>
- In-Reply-To
- <7vy6pujmsc.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Instead of saying "Merge in", we could say "Integrate" to cover both > practices.
I'm fine with both. I consider rebasing as a kind of merging, but ...
> I also happen to think that the mention of --force falls into the > same category as "try shooting and then study if it hurgs".
Depending on the context. In the case of
git push git commit --amend git push
Pointing the user to 'git pull' is probably the thing which hurts the most. And to me, the name --force already means "yes, I know what I'm doing". My proposal was "[...] use git push --force to discard the remote changes." which warns enough about the danger.
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'.
I thing not pointing to 'git pull' in the message really defeats the purpose of the patch. I don't find an error message only telling me "go read the doc as you should have done from the beginning" really helps.
-- Matthieu