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

This widget could not be displayed.

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: http://git-scm.com/book/ch7-1.html#Formatting-and-Whitespace

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 May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

873 views 2 3
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