Hey,
I have a feature branch with two dozen commits which I merged into master locally and now want to push directly to git. All commits have been reviewed, so going via gerrit makes no sense. (In fact it complains about the stuff already being closed it I try that.) When I try to do this, I get the below message:
git push origin master Counting objects: 102, done. Delta compression using up to 4 threads. Compressing objects: 100% (80/80), done. Writing objects: 100% (83/83), 36.01 KiB, done. Total 83 (delta 49), reused 0 (delta 0) remote: Resolving deltas: 100% (49/49) remote: Processing changes: refs: 1, done To ssh://review/mediawiki/extensions/SemanticMediaWiki.git ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to 'ssh://review/mediawiki/extensions/SemanticMediaWiki.git'
This is after I did a pull from origin master
git pull origin master
From ssh://review/mediawiki/extensions/SemanticMediaWiki
* branch master -> FETCH_HEAD Already up-to-date.
Anyone know what's going on and how I can fix this?
(I have gerrit rights to directly push to this repo.)
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Le 04/12/12 23:20, Jeroen De Dauw a écrit :
I have a feature branch with two dozen commits which I merged into master locally and now want to push directly to git. All commits have been reviewed, so going via gerrit makes no sense. (In fact it complains about the stuff already being closed it I try that.)
Message: ! [remote rejected] master -> master (can not update the reference as a fast forward)
That means your master is apparently not based on Gerrit master. I would try merging again:
Start out using a clean version of latest origin master:
git remote update git checkout -b featuremerge -t origin/master
Then merge in your feature branch:
git merge featurebranch
Your local featuremerge branch should be now be a merge commit with the previous commit being origin/master. Push it for review to Gerrit and submit the resulting change:
git push origin featuremerge:refs/for/master
If the commits already got reviewed, I guess they are in a branch known to Gerrit?
wikitech-l@lists.wikimedia.org