Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Only problem is, I didn't realize the problem and made two commits after the merge, as seen in the image. Is there a way to keep the commits I made in the side branch while separating master from the side branch? Commented Sep 7, 2017 at 15:21
  • 1
    there is no "seperating the master"... merge as I said is a commit at the end of the day. after the commit (merge) there is no more context of what got from master and what got there from the branch so I think you can't achieve what you are asking for. what you can do is to create a new branch from head, revert it to before merge, do git compare with the branch you started with and manually take the changes you want to keep. (If you are using Intellij this can be done quite easily.. probably on similar IDE's as well)
    – Tal Joffe
    Commented Sep 13, 2017 at 7:31