I have three branch on my git tree. master contains validated source version, develop contains staging versions, then I have some feature branches.
For now, I have the current strucutre; The numbers represents some individual commit hashes for simplicity.
master develop feature o----------o----------o----------o 1 2 3 4
Commit 2 and 3 come from a feature I merged on the develop branch. I then started working on a new feature branch.
I need to rewrite what was done in commit 2 and 3. For this, I need to branch my current work on new-feature from master and re-build the merged branch I had containing commits 2 and 3.
Here is what my git repo tree should look like.
[What I want] master/develop o 1 | rewrite-feature +----------o-----------o | 2 3 | | feature \----------o 4
master and develop are pushed. feature is a local branch.
I am the only one working on this project, so I can mess up with the origin if needed without impacting anyone.
I'm really not sure of what I should do, specialy regarding to the pushed master and develop branches.
I think I should rebase the feature branch on commit 1. But I don't understand how to deal with those commits 2 and 3 without messing with the public repository.