Re: [PATCH v2] push: point to 'git pull' and 'git push --force' in case of non-fast forward
- From
- Teemu Likonen <tlikonen@iki.fi>
- Date
- Aug 8, 2009, 08:35 UTC
- Message-ID
- <87prb6r9d1.fsf@iki.fi>
- In-Reply-To
- <1249717868-10946-1-git-send-email-Matthieu.Moy@imag.fr>
On 2009-08-08 09:51 (+0200), Matthieu Moy wrote:
> 'git push' failing because of non-fast forward is a very common situation, > and a beginner does not necessarily understand "fast forward" immediately.
Show 6 quoted lines
> + if (nonfastforward) {
> + printf("Push was rejected because it would not result in a fast forward:\n"
> + "Merge in the remote changes (using git pull) before pushing yours,\n"
> + "or use git push --force to discard the remote changes.\n"
> + "See 'non-fast forward' section of 'git push --help' for details.\n");
> + }I'd like to add that some projects that use Git in (partially) centralized manner prefer "git pull --rebase" before "git push".