I am new to Git and would like some help. This question is similar to Move the most recent commit(s) to a new branch with Git but that question asks about the most recent commits. This is not what I need. Let me explain further...
I have a branch, lets call it Feature1 branch. Feature1's parent is the master branch and Feature1 has the following commits:
- A
- B
- C
- D
- E
- F
However, the A and B commits don't really belong in that particular branch and should have really been in a different branch that would be the child of the Feature1 branch. Let's call this supposed branch that A and B belong to as Feature2 branch. Again, this branch has to come off of the Feature1 branch and NOT from the master branch.
This Feature2 branch has not been created yet. However, the contents of Feature1 have already been pushed to remote. My question basically is... How do I move A and B commits to a new branch called Feature2?
Note: C, D, E, and F don't rely on A and B. A and B change completely different files than the other commits in the branch.