Made changes to a commit, performed commit amend. Do a push and I get the error:
! [remote rejected] master -> refs/for/master (no changes made)
Checked the change ID in the commit message and its still a valid commit.
I've tried changing a file, checking it shows up as an alteration and then added to staging area and done another commit amend. Try the push again and getting the same issue. No idea on this one.
Edit: This is pushing to gerrit, not git directly.
I'm running:
git push origin master:refs/for/master
And the result of getting the details of origin are (with company details edited out):
$ git remote show origin
* remote origin
Fetch URL: ssh://[email protected]:29418/myrepo
Push URL: ssh://[email protected]:29418/myrepo
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master rebases onto remote master
Local ref configured for 'git push':
master pushes to master (up to date)
git push origin master:refs/for/master
and origin is set up with valid fetch and push URLs. – Macedonianrefs/for/...
rather thanrefs/heads/...
syntax, are you using Gerrit? If so, that would be highly relevant to your question and should be mentioned. – Arielarielagit push origin HEAD:refs/for/master
when pushing to gerrit. – Doviedow