

Both M and J would point at I as their parents, and G/D would point to C as their parents, and the rest would simply point to their immediate parent. Even if you somehow manage to rebase J-K-L onto a new branchB, and commit M to the now vacant space, the object data would be identical. list commits with specific file modified. git/refs/heads), and the rest of the tree is determined solely by parent-child relationships in git. description git init dirname create a new empty repository git init. And now we pretend that we actually implement a test here, but with a bug in it, lets say bug. Now on this feature branch here, we will create a fifth test in the BowlingGame2Test class and we name that test, lisaTestFive. We will create a new branch git checkout -b feature/test5-lisa-amend. What I mean is, if you rename your branchA to branchB, and branch off from I to create the new branchA, and commit M to branchA, you should get what you want.Īs far as I know, the branches are simply named heads pointing to particular commits (look at. Lets help Lisa with her first task of this chapter. I don’t understand your concern about G, H, I appearing on branchB instead of branchA. Instead of resetting branchA, use git rebase -onto branchA to move everything past commit L on branchA onto commit I. If commit M has already been made, then you’ll need to use rebase. The thing that needs moving is branchA, which gets moved back to commit I. # If you don't want to check out branchA, you could use git branch branchB branchA # start branch B at commit L You want them on branchB? Make branchB point to commit L.
