2011-05-20

git - compare branches

How to see the difference between two branches in git?

To display different lines:
git diff master..branch

To display different files:
git diff --name-status master..branch

You can make your console use colours to emphasise differences too:
git diff --color master..my251

You can swap branches to view it from the other perspective (depending on how you want to merge):
git diff branch..master

No comments:

Post a Comment