How to get the diff between a tag and its base in Git?
I need to generate a patch of commit with respect to its base. A tag has been marked on that commit. So like on 939023 I do a commit and now it becomes 213232, I will tag 213232 with a label. Now given t开发者_开发百科he label, I need to find out the diff between the 213232 and 939023.
I mean I need a way to generate a diff of any commit whose label is given to its base.
Any ideas?
git diff <commit> <commit>~
That will show the difference between a commit and its parent (assuming that you mean the parent when you say “base”).
Shorter version:
git show <commit>
git diff 939023..213232
精彩评论