Reputation: 32157
I've configured Gerrit to allow Push Merge Commit
on my branch, but I still get the following error when I try to push a merge commit:
! [remote rejected] ANDROID-foo -> ANDROID-foo (you are not allowed to upload merges)
I'm running Gerrit 2.8-1-gaa9367b.
Upvotes: 16
Views: 32018
Reputation: 2223
try to follow these steps:
try to apply these commands after shelving/stashing ur changes, once done, unshelve them and commit / push
Upvotes: 1
Reputation: 1
First I reset the pointer to the commit of remote using soft mode, then I run
git add .
git commit --amend
git push
It works for me. :)
Upvotes: -3
Reputation: 32157
This is a bug in gerrit. The workaround is to create another reference named refs/for/refs/heads/<BRANCH_NAME>
, and allow Push Merge Commit
on it.
To be more specifically, add following lines in your project.config
file
[access "refs/for/refs/*"]
pushMerge = group <your-id-here>
Upvotes: 21
Reputation: 746
It worked for me by this way(after this link):
Upvotes: 7
Reputation: 53502
Workaround which was more suitable for me as it doesn't involve knowing branches is to allow Push Merge Commit to refs/for/refs/heads/*
. You probably won't want to be doing changing these for every branch specifically.
Upvotes: 6