IIUC
It seems to be a workflow problem.
If you are working on master, which tracks origin/master.
When you do $ git pull git will fetch master from origin and try to merge it with your local master, but since your work (y) don’t exist on origin/master you get a merge-commit because the merge is not fast-forward (you have different commit history on master and origin/master.
When you push this merge-commit it will be a separate change so to solve this particular problem cherry-picking your work on top of origin/master and pushing it (as Marcin suggested) is a temporary solution.
What you want to do in the future is work on a local branch
(master) $ git checkout -b my-work
(my-work) $ //do your work and commit
To make sure your my-work branch is up to date with origin/master before you push you do
(my-work) $ git fetch origin //fetch the latest changes from origin to origin/master.
(my-work) $ git rebase origin/master // applies your work on top of the up-to-date origin/master
Now you can push to your Gerrit instance.
I usually delete my local branch after that and if I need to do more work on the change I check-out the change from Gerrit.
/Sven
--
--
To unsubscribe, email
repo-discuss...@googlegroups.com
More info at
http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
repo-discuss...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.