file showing in modified filter but diff window says unmodified

I downloaded a github repo, created a project in eclipse, pushed the project contents to a server via a metadata API, did some work etc. Its possible that the metadata API process might have modified my files in some way because now in Sourcetree I'm seeing all of my repo files in the 'Show Modified' filter list. When I click on any of them that I didn't manually change the diff window says 'unmodified file'. Any idea what would cause this or how to filter these out?

1 answer

1 accepted

0 votes
Accepted answer

Permission changes and whitespace changes (newlines in particular) count as modifications, but diffing will show no difference for either of these situations.

Take a look at this documentation on workarounds for whitespace changes:

Wouldn't whitespace changes show up with the Ignore Whitespace box unchecked?

Theoretically, yes. I'm still convinced that it's a line ending problem considering the symptoms of the problem. Sourcetree is probably just inherting its behavior from your git config.

Do you see the same thing on the command line if you run 'git status'? If so, what do you see when you run 'git diff <modified_file>'?

What OS are you working on? Are you working with a team that uses other OSes?

when i run git status it shows them all as modified

If I do a git diff for a specific file I see : 'warning: LF will be replaced with CRLF ... the file will have its original line endings in your working directory'

If you run 'git config --global core.autocrlf false', the warnings should go away.

thanks that seems to have done it

Always happy to help!

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