git 获取git中标签之间的提交列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5863426/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Get commit list between tags in git
提问by telemaco
If I've a git repository with tags representing the versions of the releases.
如果我有一个带有代表版本版本的标签的 git 存储库。
How can I get the list of the commits between two tags (with a pretty format if is possible) ?
如何获取两个标签之间的提交列表(如果可能,使用漂亮的格式)?
回答by manojlds
git log --pretty=oneline tagA...tagB
(i.e. three dots)
git log --pretty=oneline tagA...tagB
(即三个点)
If you just wanted commits reachable from tagB but not tagA:
如果您只想从 tagB 访问提交而不是 tagA:
git log --pretty=oneline tagA..tagB
(i.e. two dots)
git log --pretty=oneline tagA..tagB
(即两个点)
or
或者
git log --pretty=oneline ^tagA tagB
git log --pretty=oneline ^tagA tagB
回答by Ben Stiglitz
回答by hidro
To compare between latest commit of current branch and a tag:
比较当前分支和标签的最新提交:
git log --pretty=oneline HEAD...tag
回答by lual
回答by starsinmypockets
FYI:
供参考:
git log tagA...tagB
provides standard log output in a range.
提供一定范围内的标准日志输出。