After having a look at a gazillions of websites and StackExchange questions, I want to add a further question about Git. I think that this answer comes quite close to what I want, but I was not successful.
Gitg displays my repository as having branches (ok), but one of these branches was merged into another one twice. I want to modify the history by just removing the commits which do these merges. These commits have a message beginning with "Merge branches" and "Merge branch". All I want is to just keep these branches parallel, unmerged. Also, there were commits to these branches after these merges which have to be kept intact. These branches do not touch the same files, so there should not be a conflict.
Please see here the screenshot of Gitg. So, I want these branch drawn in blue not connect to the branch drawn in green. How can I do this (for manipulating the repository, I am using the command line, of course).