Renaming a file doesn't work

I'm trying to rename a file from tradinghistory/settlementReports/2013/20130327 Report_Statement (1).csv to tradinghistory/settlementReports/2013/20130327 Report_Statement.csv. When I do this via the move command, it moves it to tradinghistory/history/settlementReports/2013/20130327 Report_Statement.csv - i.e. it adds an extraneous "history" directory in the target. If I rename source files from within IntelliJ, this works, but the same issue happens within SourceTree. Thanks

3 answers

1 accepted

Created https://jira.atlassian.com/browse/SRCTREE-1669 but I don't think I have the ability to assign to you. Thanks!

Why don't you use your file manager to rename/move the file? You then will see an untracked and a missing file, but after committing both, the history will be linked.

Yes I can do this, but I don't see how it's going to keep track of file history. For instance if I have FileA.java and FileB.java, if I delete these and add FileC.java and FileD.java I think it would be pretty amazing if SourceTree could figure out whether FileA.java was renamed to FileC.java or FileD.java....

Not SourceTree is amazing in detected renamed file history, but Git is - and hence every Git client. Check out http://stackoverflow.com/questions/1094269/

Hi Chris,

I've just tried this using your exact same file structure and filenames and have been unable to reproduce the problem you're describing. Could you re-test this? Are you sure there isn't another folder tradinghistory/history which has the same file structure and you're actually trying to rename that a file in that directory instead?

Thanks in advance

Hi Kieran, Thanks for your reply. It's 100% repeatable, which is good and bad I guess! I have a set of 4 jpgs which I can send you to show the problem, maybe you could let me know where I can upload them? Also, I suspect this isn't the right forum to be raising bug reports, so please let me know if there's a better place for me to be reporting this. Thanks, Chris

Hi Chris,

You're right, JAC is where we have bug reports over at jira.atlassian.com. The project name is SRCTREE and you can assign it to me. Just detail as much as you can and we can go from there.

Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you