No, I hadnât. Thanks, @wborn, for the hint and it finally did the trick.
As I am not a git guru myself I asked one of my trusted git genies who led me right path how to do the rebasing as I am working on a branch of a fork of the core-project.
So if anyone needs to do the same, here is what I had to do:
Just to clarify. These commands are for when you have NO changes made on master yet (and one should not make changes on master, but always on a branch). Otherwise you might end up with merge commit, cluttering your history. If you have changes on branch and want to rebase do on the branch:
Just to be clear: I am not on the openhab repo directly but on our own fork (https://github.com/raepple/openhab2-addons/tree/canvas_touch_support) and the implementation itself is done on âmyBranchNameâ. Only after the branch has been reviewed and QA-checked we intend it to merge to the openhab-core-repo (with all the review process that is involved).
(forgive me if a may use wrong wordingsâŠgit sometimes is really tough to understand with all its facets).
Again thanks for the advice. I will check your comment tomorrow with my Git guru
Your free to do so. To be clear so you donât get confused tomorrow. Depending on your develop preferences using --rebase is sometimes argued as not being proper git use. So if youâre git guru will argue that. Than know that if you use merge commits it will trigger every and each of the merge committed other contributors on git when you push it to your pr (as already happened on your own pr). Also we always squash all pull request because we donât want to clutter the repo with a gazillion small commits that have no added value. And when we squash commits the merge commits are gone anyway. So merge commits donât add anything here. If what Iâm saying all sound like abra-ca-dabra then just let it read your git guru in case of objections to my suggestions
No worries DCO stands for Developer Certificate of Origin. It checks if you have signed off on a commit. Which practical simply means if you have put the following line in the commit:
Signed-off-by: [your full name] <your e-mail>
Itâs a statement that you state that you wrote that code and didnât steal it.
The DCO check compares your commits with the e-mail address used to make the commits. In your case because you have a merge commit it complains about all the merged commits because are new for git as they have been merged. In such a case the suggested signoff should not be done.
In practice you should do the signoff on all your commits. But if you have trouble adding the sign off to earlier commits at least make sure the signoff is done in either at least one (new) commit or put the signoff in your pull request description.
Together with my colleague I went into the whole merge situation and it showed that the branch had cluttered commits from the core-repo which noone of you would have merged without having been beaten to do so (similar to what you mentioned above with âOtherwise you might end up with merge commit, cluttering your historyâ).
Hence, we went back into history and applied the commits again the right way. Now the merge request looks much cleaner and the signoff is actually something that the commits and the mr deserve.