Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Retrieve all commits across all branches in repo

Jourdan West April 7, 2017

I've imported SVN repos to Bitbucket and need to extract author information from all previous commits.

I'm hoping to avoid making an api call for all the branches then another api call for each branch's commits.

What is the easiest way to accomplish this via REST API 1.0 ?

1 answer

0 votes
Jens Schumacher - Released_so
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 31, 2023

Hi @Jourdan West

There is no single API call that will give you all commits across all branches. You will have to loop over all branches to retrieve the commits. 

However you could try to use a git command to get the information instead. For example the following will give you the commit has, followed by the username and email address: 


git log --format="%H %an <%ae>"

 Cheers,
Jens

Jens Schumacher - Released_so
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 31, 2023

Also I just saw that your question was from 2017 🤦‍♂️. Not sure why it popped up on top of my feed. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events