Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

SoruceTree renaming folders/directories


I cannot find how to rename a folder/directory using SourceTree. I only see files but no folders.

Could anybody point me in the right direction?

Kind regards,


5 answers

1 accepted

0 votes
Answer accepted

Hi Mauricio,

We don't currently support renaming of folders, just files at the moment because of the way we treat the folder structure. I've filed a feature request for you on JAC, although you may want to indicate if this is for Windows or Mac. We'll likely do the same thing on both platforms. Here's the issue:

Hope that helps!

I think it's not possible at the moment (I searched for it myself in vain ...)

As git is a content tracking system, you can simply move the file within your directory tree using standard explorer actions. Doing so the hash-value (sha1) of the file keeps the same - the only thing that changes is the object tree. Git will automatically recognize the change in the directory tree, which can be commited

Hello Johannes, Kieran

Thank you for your answers. I'm running SourceTree on Windows. I'll give a try to the solution proposed by Johannes.

Kind regards,


Yes, just rename the folder in Explorer then use the Add/Remove button in SourceTree, and Git will pick up that the files have been moved automatically.

Thank you Steve.

If having issues with this working via the SourceTree interface, this simple command works perfectly.

  1. click on Terminal button in tool bar
  2. terminal will automatically open to directory of proper repo
  3. type the following:  hg addremove --similarity 100
The 100 means files must be 100% the same, so if you just moved them, they will be... I you moved and renamed, you can also use a high number, say 93, and perhaps that will work for you. Either way, the command will list all of the files and their percent similarity.
I got the tip here:

I get

  • "hg: command not found" for hg addremove --similarity 100
  • "hg is not a git command" for git hg addremove --similarity 100

Also where in those commands do you specify the new name of the folder?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 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...

3,274 views 4 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