From: Steffen Prohaska Date: Sat, 03 Nov 2007 07:51:29 GMT Subject: Re: [PATCH] errors: "strict subset" -> "ancestor" Message-ID: <3F4A5458-AB2F-40C7-AA0E-9D26981BCE9D@zib.de> In-Reply-To: <20071103023944.GA15379@fieldses.org> On Nov 3, 2007, at 3:39 AM, J. Bruce Fields wrote: > From: J. Bruce Fields > > The term "ancestor" is a bit more intuitive (and more consistent with > the documentation) than the term "strict subset". > > Also, remove superfluous "ref", capitalize, and add some carriage > returns, changing: > > error: remote 'refs/heads/master' is not a strict subset of local > ref 'refs/heads/master'. maybe you are not up-to-date and need to > pull first? > error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/ > git.git' > > to: > > error: remote 'refs/heads/master' is not an ancestor of > local 'refs/heads/master'. > Maybe you are not up-to-date and need to pull first? > error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/ > git.git' Junio suggested in [1] (see also earlier messages in that thread) to replace the recommendation to pull with a hint where to look in the user manual. [1] http://marc.info/?l=git&m=119398999317677&w=2 The point is, there are various ways to resolve the problem. pull is not necessarily the right solution. At least, you should consider to rebase. Or maybe just something else went wrong. Nonetheless I think it could be a good idea to keep the most likely cases. So, how about "Are you up-to-date? Did you forget to pull or rebase? See User's Manual for details." I put it as questions to avoid making a suggestion. The questions should give sufficient hints for searching in the User's Manual. I haven't found the single section that would explain exactly the situation we're dealing with. I attached the commit that originally introduced the suggestion. Steffen commit 69310a34cb6dcca32b08cf3ea9e91ab19354a874 Author: Junio C Hamano Date: Thu Dec 22 12:39:39 2005 -0800 send-pack: reword non-fast-forward error message. Wnen refusing to push a head, we said cryptic "remote 'branch' object X does not exist on local" or "remote ref 'branch' is not a strict subset of local ref 'branch'". That was gittish. Since the most likely reason this happens is because the pushed head was not up-to-date, clarify the error message to say that straight, and suggest pulling first. First noticed by Johannes and seconded by Andreas. Signed-off-by: Junio C Hamano