BitBucket branch rename history

Yatish Madhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2023

Hi

This is one of my first/early BitBucket community posts :) Hoping this is a start of great things and I learn a ton RE BitBucket.

I have a query around when a repo branch has changed. Can we see the history of a branch rename, who did it and when?

Thank you in advance.

Thank you
Yatish

1 answer

2 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2023

Hello @Yatish Madhav and welcome to the Community!

Git only tracks the branch renaming in the reflog of the local repository where the rename originally happened. In case you still have access to the repo where the rename was initially executed, you can run the following command inside the local repo to check the reflog entries : 

git reflog

where a rename entry would be similar to the example below: 

9002ff79 (HEAD -> dev, origin/development) HEAD@{0}: Branch: renamed refs/heads/dev to refs/heads/development

If you don't have access to the local repo where this action was executed, I'm afraid git does not track this information elsewhere.

Hope that helps! 

Thank you, @Yatish Madhav !

Patrik S

Yatish Madhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2023

Hi @Patrik S  - thanks very much for that answer. I had a look and got a similar response BUT I just realized I originally created the repo with the default branch name as main and not master - so it was in fact not ever changed :D 

But this response helps. Thank you again.

Cheers for now.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events