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

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
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 ...

647 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