Current state
(master) a -> b -> c
|
(itrb) -> d
Idea: Create a new branch from b, merge that into (test)
1. Go to the commit
git checkout (hash for commit b)
git checkout 32167235b8b1e4f874e901a265641d6c7fb01e33
2. Create a new branch off of this commit
git switch -c middle_branch
Current state:
(master) a -> b -> c
| |
| -> (middle_branch)
|
(test) -> d
3. Push this new branch:
git push --set-upstream origin middle_branch
4. Switch over to test branch
git checkout itrb_test
5. Merge from that middle branch, resolve conflicts, and push
git merge --no-ff origin/middle_branch
(resolve conflicts if any)
git push
Current state:
(master) a -> b -> c
| |
| -> (middle_branch)
| |
(test) --------> d'