You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.