Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab API to get all commits of a specific branch

Tags:

branch

gitlab

api

By default, the API GET /projects/:id/repository/commits gets commits of master branch, but I want to get other branch's commits.

like image 963
t.jl Avatar asked May 02 '17 08:05

t.jl


Video Answer


1 Answers

According to Gitlab docs you can add parameter "ref_name" and specify the branch from which you want to get the commits:

GET /projects/:id/repository/commits?ref_name=my_branch_name
like image 194
K. Gol Avatar answered Oct 12 '22 23:10

K. Gol