Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

View history of renamed file


I need to see history (using bitbucket web interface) of a file that has been renamed

2019-06-04_9-20-04.jpgbut when I go to "Source" I see that all previous commits of this file (for the period before it was renamed) have disappeared:


Can I somehow see the full history of the file?

Thank you in advance.

2 answers

I was worried too, turns out it's a simple fix, and relates to the --follow flag in git.

When you right click a file in Sourcetree, and select "Log Selected..."  this new window that pops up, you will see the "Follow renamed files" at the bottom left of this window. Select it, and viola, you can see all the commits even back when the file had a different name.

0 votes

Hello Oleksandr and welcome to the Community!

To ensure we address the proper issue, there was a file within your repo which was renamed and once said the file was renamed the entire git history for the old filename is now removed, and only new commits are showing for the newly named file. With this said, this is more of a functionality of how git functions with file renames. This can be due to the nature of the rename which git may treat as a create a new file (new file name) and delete old file (old file name). There are methods within git to make a file rename be treated as a move instead of creating then delete. There is an excellent StackOverflow post which describes similar git process which may be found at How to make git mark a deleted and a new file as a file move?

With this said, if you’re using the Web UI to rename a file and notice then that the history is removed then most likely you’re impacted by the following bug; File history should follow copies and renames (BB-681). If this is the case, please vote and watch this request to receive future updates on its status.

I hope this proves helpful and adds some clarity to file names and commit history.

Stephen Sifers

Never mind, I now see your link to the open issue. I added my vote to hopefully get it implemented soon.

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

226 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you