How to get a list of commits from a bitbucket project

chandrasekhar T
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 29, 2024

Hello,

Greetings for the day!!

I need to prepare a report of all repositories and it's respective commits of a bitbucket project.

Example:-

Project Name: ABC

repo1: Abcd

repo2: Efgh

repo3: Ijkl

and so on...

 

I tried with "git log --pretty=format..." but I have nearly 170 repositories in total. It's a bit difficult to manually do it.

 

Could you please guide me the way to automate the effort ?

 

Thanks in advance.

 

1 answer

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 1, 2024

Because you wrote about using the Git commandline client ("git log ..."), I assume that all the  170 repositories are cloned to the corresponding filesystem.

If so, you can write a little shellscript that:

  • iterates over all repos
  • enters the directory of a single clone
  • runs "git log ..." and redirects (appends!) the output to a text file

When script completes, the text file will have the total result.

On Linux, this is something pretty easy to do, but it shouldn't be very hard with Windows batch files, either.

chandrasekhar T
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2024

Hi, yes I agree to your suggestion.

I will try that. Thank you.

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events