Move files and folder to another path keeps history?

I have created a new folder inside my local repository using windows explorer. After that, I have moved a previous folder inside this new one. And then, I have renamed this folder moved with a new name.

The folder I have moved and rename has files where I have done changes and commit them.

Will I lose these commits when I move the files to a new renamed folder?

On sourcetree I see that they are going to be renamed but I'm not sure if I will lose all commits history with this action.

1 answer

If Git recognizes the change as a "rename", then it will keep the file history linked.

In SourceTree, if you're seeing this icon you should be good: image2016-6-15 8:49:28.png

Yes, that's the icon I see. Thanks.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,125 views 4 2
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