SourceTree is showing thousands too many modified files in working copy


I'm really new to Git and SourceTree but it has worked OK until now. For some reason SourceTree is showing 2500+ modified files in my working copy although I have only modified 10 or so. If I view of the unchanged files in Finder I can also see it hasn't been modified for days.

Is there some way to ignore all these files in bulk without deleting or reverting them and maybe let SourceTree find the actual changes when I then re-save the files I want to commit?

I recently made some read/write updates with chmod -R 777 on some of the folders in my local copy, could that have something to do with it? I'm using SourceTree 2.0.3 on OS X Yosemite 10.10.

1 answer

1 accepted

2 votes
Answer accepted

I am able to recreate what happened to you this way:

  1. chmod 777 someDirectory
  2. ("git status" shows no change)
  3. chmod 777 foo.txt
  4. git status shows: 

    "modified:   foo.txt"

So the problem is not that you did chmod on directories, it's that you did it on files.
Here is a solution that will work:
  1. copy the files you really modified to a non-git scratch directory
  2. git reset --hard HEAD
  3. copy the files you really modified back into the git working directory
  4. note that the "git reset --hard HEAD" will undo all those chmod's that you did.


That worked great, thanks a lot for taking the time!

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,204 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