Search code examples
gitmergegit-merge-conflict

how to check that all changes were taken after a git merge


in our git workflow we use branches (pretty much as described here a successful git branching model)

so when we merge one branch into the other we use:

git checkout <destination>
git merge --no-ff <src>

if there is a conflict, after resolving it, i would like to check if the merge was correct (if nothing was overwritten in destination and if all the changes were taken from source).

to check if nothing was overwritten in destination i run a diff between the commit before the merge and the commit with the merge resolution.

but how can i check that everything was taken from master and has not been lost in the merge/resolution?

thanks.


Solution

  • you can view a diff of the resulting merge with the previous commit in the merged branch

    git diff HEAD^

    this command will show the difference in all files between your current state (which in your case should be the merge) and the previous commit in this branch