Some background:
- I forked from a upstream repository.
- Checkout develop branch from this fork a couple of weeks ago
- Performed some changes and checked in (Did not push yet)
- Meanwhile some other changes were pushed to develop branch of upstream.
Current situation.
Priority got changed and I had worked on another feature on same develop branch. I should have created a different branch but I continued to add that new feature of top of my current changes and checked in. This means my develop branch has all my 2 weeks changes + this one new feature.
What do I want to do ?
I want to get the exact copy of upstream/develop onto my current (I do not want to create another branch) develop branch and apply only my latest change to it and push it.
Apply my old two weeks work on top of this change on same branch. This I'll be pushing couple of days later.
Can somebody help me with git commands and explain what's happening at back ground ?
Things I tried. git reset --hard This tell me my head is detached.
git rebase -i upstream/branch. I think this is going to apply all my changes but I only want last change I did.