Hi Gerrit users!
I have a question about pushing to remote branches and gerrit access configuration.
I have a remote branch called XYZ. By git fetch and git checkout I have local 'shadow' branch with one additional commit I want to push to remote repo.
mgrzechocinski@mghp:~/dev/app[XYZ]$ git status
# On branch XYZ
# Your branch is ahead of 'origin/XYZ' by 1 commit.
#
nothing to commit (working directory clean)
Now trying to push:
mgrzechocinski@mghp:~/dev/app[XYZ]$ git push origin HEAD:refs/heads/XYZ
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 307 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done
To ssh://gerrit/app.git
! [remote rejected] HEAD -> XYZ (can not update the reference as a fast forward)
error: failed to push some refs to 'ssh://gerrit/app.git'
What am I doing wrong? What this message means? I'm just trying to push one simple commit which parent is same as remote HEAD.
In Gerrit admin panel, my group has access to Push.
Thanks ins advance for any hints.
--
Matthew