[SOLVED] Issue with PR rebase (2.5.x)

Have a PR (new binding), #6457, which was created prior to OH 2.5 release. Made some changes to source code, and also did a rebase to OH master after 2.5 release, thus having PR commits based on master from after 2.5 release.

After creation of 2.5.x branch, I switched PR to branch 2.5.x and had to do git reflog / hard reset of my branch to the initial commit, prior to 2.5 release. Did a rebase to 2.5.x branch, and revised/committed latest source code, and my PR was ok again (without conflicts).

However, with the raise of OH 2.5.2 my PR had conflicts. Attempted to do a direct rebase from latest commit, but ended up with a strange sequence of commits. Tried once again to git reflog / hard reset to initial commit, rebase branch and revise/commit source code, although ended with a trail of commits following my PR (current “as is” status).

Also started out to create a new branch to perform hard reset against, i.e. pull 2.5.x branch, create new binding skeleton, and copy latest source code. Although, when trying to commit to the new branch, my committed files was noted as “create mode 100644” or “create mode 100755”, apparently related to file permissions, so aborted commit.

Development enviroment: Mac OS.

Any hints to fix PR? Both Travis build and Jenkins build have run with success, but I do have “Files changed” belonging to the trail of following commits.

I believe the master was changed to OH3 which is not yet functional. There is a 2.5 branch? though I believe for addons.

As mentioned in my initial post, I did successfully rebase from master to the 2.5.x branch as a first step. My rebase problem started when I tried to rebase again towards the 2.5.x branch, after branch was updated to 2.5.2 just recently.

Did you change the branch of your PR to 2.5.x on Github? When in the PR, click the Edit button to the right of the PR title. Then change the branch from master to 2.5.x.

I think you might’ve said that in your initial post, but it wasn’t 100% clear to me.

Yes, PR is switched to correct branch (2.5.x), and I did a previous rebase to the 2.5.x branch which worked out fine.

My issue happened when trying to rebase PR once again to the 2.5.x branch, after the recent update to 2.5.2. Regardless of where I place HEAD in my branch, I end up with a trail of commits/files changed.

Will look into interactive rebase as suggested on github.

Believe i figured it out.

The interactive rebase did not provide evidence of what was wrong, so ended up creating a new branch, hard reset against 2.5.x branch, created new binding skeleton and implemented source code. Committed/pushed to new branch.

For the PR branch I performed hard reset against the newly created branch and force pushed, and I apparently managed to get a “clean” PR.