Last person who merges the code won't see changes made to his branch
Asked by lang qiu:

The problem is best illustrated by the following picture sourcetree.png

So we started with a common base, commit id 81109ae, then I did some change and my colleague did some change too. Then he merged my codes and continued with his work (commit 97cfed3). I continued to work on my own too (4103044).

Then I merged his code and have all of the latest code (commit a78cfd3) So far so good. I can see what changes were introduced in this commit.

Then my colleague merged the latest code as well. His codes were also updated the latest codes. BUT sourcetree added just a label to that commit indicating his codes were also updated too. He can not see what changes were introduced into his branch, to be exact in his case, he can not see what I did commit 4103044 that merged into his codes base.

So is this a sourcetree problem or git ?

Thanks!  
[](https://community.atlassian.com/t5/Sourcetree-questions/Last-person-who-merges-the-code-won-t-see-changes-made-to-his/qaq-p/378651?attachment-id=8662){#link_116a84dbe70854}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11252/1/sourcetree.png){#display_116a84dbe70854_0}


Answers:
author: Bal?zs Szakm?ry
body: This is not a Git problem or a SourceTree problem, it is just the way Git works.

In the last paragraph, the merge was a fast-forward, i.e. no new merge commit was created.

If you read for example, [this](http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging), hopefully you will understand better.

comments: author: lang qiu
body: Then how can my colleague see the changes introduced into his branch ?

Thanks!


author: Bal?zs Szakm?ry
body: The merge was a fast-forward. This means that later commits (further up the same line) were merged into his workspace, but there is no merge commit, because there were no parallel changes. The moving of the branch flag and the changing of the working copy are the only things that happen. Please do read the docs, they explain this much better.


author: Seth
body: In the future, your colleague can select the option to NOT fast-forward in the merge dialog.


author: lang qiu
body: Hi thanks for the replies. So one last question, if he uses fast-forward and still wants to see the changes introduced, then if "git diff" the best tool he can use ?


author: Bal?zs Szakm?ry
body: I think simply clicking through the commits that got merged is the simplest. (Unless they are very many.)


author: lang qiu
body: Thanks. I have accepted your answer.


author: lang qiu
body: Hi I am afraid I have to bring up this question again. So red ones are my commits and blue ones are my colleagues'.

My last merge was a fast-forward and since there are several commits between 9957b17 and df1b868, clicking through them is not an effective way to changes introduced between my commit 79dbcee and 9957b17. So is there a better way to see the changes? I did use git diff but there were too many output from them, not easy to see change either.

Thanks!

CloudPhone__Git_.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/Last-person-who-merges-the-code-won-t-see-changes-made-to-his/qaq-p/378651?attachment-id=12676){#link_116a85190ab1b3}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11260/1/CloudPhone__Git_.png){#display_116a85190ab1b3_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Last-person-who-merges-the-code-won-t-see-changes-made-to-his/qaq-p/378651?attachment-id=12677){#link_116a85190ab1b3_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11260/2/fastforward.png){#display_116a85190ab1b3_2}

comments: author: Seth
body: You'll have to go to the command line. "git diff 9957b17 df1b868"


author: Seth
body: You can output the diff to a file if you prefer to view it that way.


author: lang qiu
body: I already did as I mentioned in my question but I was wondering was there a better/easy way ?


Tags: git

merge