I've created a simplification of a scenario in which I'm trying to understand why it works like that.
Here is the timeline of commits:
At first I've created a new branch named dev
+ feature
- both had one commit:
Let's look at dev
:
Then added another line and committed :
Then another one :
And another one :
Then I switched to feature
branch and added "bad code" :
Then I've switched back to dev
and merged feature
to dev
:
So now I decided to revert the merge commit :
git revert -m 1 2c618a9
(parent 1 is the dev branch) and the revert did work as expected.
However, When I try ( only for testing purposes) to re-merge the feature
branch to dev
, nothing seems to happen: and I do not see the bad commits again :
Question
As you can see, the bad commits are not entered again. Why is that ? What if I wanted to merge it again?