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 

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