I am having the following problem: I worked on a branch A. Branch A was merged into the Master branch, so far so fine.
After some time, the customer decided, to undo the changed, done in Branch A on the Master branch, because it has to be updated.
So the history in the Master branch looks like :
Some stuff
Some other stuff
Some stuff, where the merge of Branch A was reverted
Some other stuff
Some other stuff
Branch A was merged into master
The commit of Branch A (Branch A contains one Commit)
I want to rebase Branch A, so I want something like:
The commit of Branch A (From here I want to continue working)
Some stuff
Some other stuff
Some stuff, where the merge of Branch A was reverted
Some other stuff
Some other stuff
Branch A was merged into master
The commit of Branch A (Branch A contains one Commit)
Note that I don´t want to change the history of my remote master, I need the commit of Branch A to be rebases on the last commits of my master. Then I want to push my updated Branch A to Master again.
Now I want to continue working on Branch A, but first I want to rebase Branch A on the current master branch, to have the newest state.
The problem is now: When I rebase my Branch A on master, git seems to delete the changed I did in Branch A. I think this is because of the merge reverse in the Master branch. So: Git sees, that Branch A was deleted in the master branch, so when I rebase Branch A on master, the deletion will be done too.
I don´t want to copy the files I changed in Branch A one after one on another Branch, which was checkout out of master. I think there is a better solution, any recommendations?