Re: Seeing git history of file including merge changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I asked the following question on StackOverflow a while ago, but did
not receive any answers so I'll try here.

We have git repository where a file was changed on a topic branch and
this branch was then merged back into the main branch. Due to various
reasons the merge was made wrongly and as a result the changes were
not accepted during the merge. The following image shows what
happened:

               -----
              (  H  )
               -----
                 ^
                 |
                 |
               -----
              (  M  )
               -----^
                 ^   \
                 |    \  -Delta
                 |     \
                 |     -----
                 |    (  B  )
                 |     -----
                 |    ^
                 |   /  +Delta
               -----/
              (  A  )
               -----


The file was changed in commit B and the changes were undone in commit M.

My problem is how to view the changes to the file between a specific
commit, e.g. B and another commit in its "downstream", e.g. H.

If you do

    git log -u B..H

you won't see any changes, as the changes due to M are suppressed. You
can see potential changes by doing:

    git log -u --full-history B..H

which will show you that there was a merge commit, but it still won't
show you the diff between B and M.

So is there a way of seeing all changes made to a file including those
made by a merge commit?

Thanks!

Dov
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]