> I had submitted two patchsets for a change, and after the review of
> second patchset, was asked to make
> some more modifications for an improvement. The overall change/patch
> itself is pending approval, and has
> not yet been merged.
[...]
> When I did a repo sync again prior to doing the repo upload, I got the
> following error:
>
> "error: <git project path name>: branch topic1 is published (but not
> merged) and is now 1 commits behind"
Yes, someone else apparently merged a change between the last time you
synced (and you started your work) and now.
> What is the best/easiest way to fix this and do the repo upload?
This is not a fatal error; the sync was successful and you'll still be
able to upload your change. However, you might not be able to submit it
after approval. You might as well rebase the commit first.
git rebase origin/master
(Or whatever your upstream is named.)
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
> I know for sure that there were no changes to any of the files in my
> patchset that were done by anyone else in our team, in between, as you
> had surmised.
That's easy to check.
git log origin/master..HEAD
(Assuming origin/master is the upstream and you've got your topic branch
checked out.)
[...]
> 1) What is "origin" and "master" in the case of using "git rebase
> origin/master"?
"origin" is the name of the so-called remote, and "master" is the name
of the branch that your change eventually will end up in.
> 2) What is meant by "upstream" in this case?
The remote branch on the server (to which you upload your commits)
is upstream from you. You are downstream to the remote branch on the
server.
> 3) If I do a rebase as you mentioned, would any of the changes be
> lost?
No, of course not.
> 4) What would be the next step, to complete the submission of this
> patchset?
Do the rebase as described, upload the commit, verify and review it,
and press submit.
> (As I am new to git, I do apologise for my ignorance of the terms
> used.)
No apology needed, but if this is something you'll be doing on a regular
basis you might want to consider getting a good Git book (or ask a
colleague or someone from your local community to help). You have a
learning curve ahead.