Hi,
I need to see history (using bitbucket web interface) of a file that has been renamed
but 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.
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.
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.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Never mind, I now see your link to the open issue. I added my vote to hopefully get it implemented soon.
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.