开发者

How to get the diff between a tag and its base in Git?

开发者 https://www.devze.com 2022-12-11 11:51 出处:网络
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 give

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号