Tanks Thomas, your advice was spot on.

I needed to configure Gerrit.

It would have been nice if Git had actually given me an error message that 
was less cryptic.

One of the serious problems with git.

On Friday, January 18, 2013 2:46:42 AM UTC-5, Thomas Ferris Nicolaisen 
> On Friday, January 18, 2013 4:05:39 AM UTC+1, J K wrote:
>> Hi guys,
>> I am having trouble.  I tried to push some changes to a remote repo 
>> (gerrit in fact if it matters).  The push was rejected because "can not 
>> update reference as a fast forward":
>> $ git push origin 2.4.1-perf
>> ...
>> ! [remote rejected] 2.4.1-perf -> 2.4.1-perf (can not update the 
>> reference as a fast forward)
>> error: failed to push some refs to 'ssh://gerrit:29418.'
>> But then when I pull to try to update my code, it says that it is up to 
>> date.
>> $ git pull --rebase
>> Current branch 2.4.1-perf is up to date.
> Gerrit works with some weird remote configurations: 
> http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.1/user-upload.html#_git_push
> So it looks like you're trying to bypass the whole "create a change-set 
> via refs/for/branchname" technique. Naturally, Gerrit will block any pushes 
> directly to a branch (unless you want to Bypass Review, which is described 
> later on the mentioned doc page).
> I would recommend that you ask the people maintaining the Gerrit instance 
> what is their policy and recommended configuration for pushing, and, if you 
> really want to, how to bypass review.
> If you need more help, please include your configuration (git config -l, 
> git remote -v, git remote show origin), your version of Git, version of the 
> Gerrit instance, and so on.


Reply via email to