How to distinguish between git tag and branch

When trying to understand the difference between the HEAD of the Appium 1.4 branch and the v1.4.16 tag, I did not find a way to tell git diff in order to distinguish between the tag and the branch.

As far as I understand, from the point of view of git diff, both the tag and the branch are just commit hash aliases, right?

In the end, I just created the tag 'v1.4' pointing to the branch branch ( git checkout 1.4; git tag -a v1.4), and then I could make git diff v1.4.16..v1.4and see the difference I was in.

But it seems a little strange, is this the only way to achieve what I need?

+4
source share
1 answer

. , 1.4. , (.. Git) :

  • ( git checkout 1.4), git diff v1.4.16
  • : git diff v1.4.16..origin/1.4

, .

+5

All Articles