![](/img/trans.png)
[英]Bitbucket REST interface and GIT; how to get a log history between two tags from a branch
[英]How to get history log from TFS API between GIT tags
我在TFS服務器上有Git存儲庫,並使用Web API嘗試獲取兩個標簽之間發生的提交的列表。 您可以使用CLI進行類似的操作:
git log TAG_1..TAG_2
但是我需要在Web API中使用。 請幫忙。
您可以使用此REST API在2個標簽之間進行提交: https : //www.visualstudio.com/fr-fr/docs/integrate/api/git/commits#between-two-versions
這是一個例子:
POST http://servername:8080/tfs/DefaultCollection/_apis/git/repositories/049d1cfa-a972-405f-923b-fe84c21474e6/commitsBatch?api-version=1.0
Content-Type: application/json
{
"itemVersion": {
"versionType": "tag",
"version": "v1.0"
},
"compareVersion": {
"versionType": "tag",
"version": "v3.0"
}
}
注意:確保那些提交和標記已經被推送到TFS中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.