sscirrus sscirrus - 17 days ago 7
Git Question

Git merge - commits seem to be missing

I have two branches:

master
and
feature
. They looked a bit like this:

--A----B----C----D----E----F----G/master
\
\
1----2----3----4----5/feature


Just now, I did the following:

git checkout feature
git rebase master


After correcting merge errors, I now have this:

--A----B----C----D----E----F----G/master----H/feature
\
\
1----2----3----4----5


In
gitk --all
, H looks like 5. I do NOT see any evidence of commits #1-4 on the new
feature
branch.

Note: functionally, there isn't a problem. When I
git checkout feature
, it includes the changes in 1-4 but I just can't see it in the branch, which is mystifying.

My Question



What is going on here? How can I bring commits 1-4 into the rebased feature branch so everything's nice and clean?

For clarification, what I'd ideally like is something like this:

--A----B----C----D----E----F----G/master----1'----2'----3'----4'----5'/feature
\
\
1----2----3----4----5


Resolution



Doh! Silly me working at 3:30am - the commits WERE copied over but they weren't at the top of the pile. In effect, the master branch looks something like:
G----1'---2'----3'----4'----5'----B----C----D----E----F----G----f‌​eature
. I'm not sure why it's this way, but it may have something to do with an earlier action.

Answer

Given the commands you shared, your topology should be as follows:

--A----B----C----D----E----F----G/master
                                   \
                                    \
                                     1'---2'---3'---4'---5/feature

Can you verify this using git log perhaps?

Comments