If I want to compare changes on a topic branch to master, I find it easiest and safest to do the following:
git checkout master
git checkout -b trial_merge
git merge topic_branch
After completing the merge, it is easy to see the consolidated change from master
git diff master
When done, simply delete the trial_merge branch
git checkout master
git branch -D trial_merge
This way, the master branch never changes.
In TortoiseGit
- Switch/Checkout master
- Create Branch... based on master, name it trialmerge
- Switch/Checkout trialmerge
- Git Merge... topicbranch
- Diff with previos version
- check the diff
- Switch/Checkout master
- delete trialmerge
Posted by kiatng to Git (2015-02-26 05:15)