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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.