在Git中获取两个标签之间的新提交列表? [英] Get list of new commits between two tags in Git?
问题描述
我正在用Perl编写脚本来提取当前版本标签(或标签)与前一版本之间的差异。我使用ClearCase来执行此操作,
cleartool diff -columns 150< old_label> < NEW_LABEL> 2 - ; / dev / null
这会让我详细了解所有人做了什么。
现在,我们正在转向Git。因此,我想知道我们如何使用Git来做到这一点?我做了如下:
git diff< old_git_tag> < new_git_tag>
但是我没有收到提交细节。请帮助我们如何从以前的标签和现在的标签中获取提交信息。
获取所有在一个标签/标签与其他用途之间提交
,
git log< old_label> ..< new_label> ;
要获得两个标签之间的所有更改
,请使用
git diff< old_label> ..< new_label>
I'm writing a script in Perl to extract the differences between the present release label (or tag) and the previous one. I was using ClearCase to do this with this command,
cleartool diff -columns 150 <old_label> <new_label> 2> /dev/null
which would give me the complete commit details of who all did what.
Now, we are shifting to Git. Hence, I want to know how do we do this with Git? I did the below:
git diff <old_git_tag> <new_git_tag>
But I'm not getting the commits details. Please help on how to get only the commits from previous label and present label.
To obtain all the commits
between one label/tag to other use,
git log <old_label>..<new_label>
To obtain all the changes
between the two labels use
git diff <old_label>..<new_label>
这篇关于在Git中获取两个标签之间的新提交列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!