Working Copy file appears as "unmodified file"

I have a file that when I change it, it appears in the working copy changes as an "unmodified file". When it is actually unmodified, though, it doesn't appear in the working copy changes list.

I have the Working Copy thing set to "Show pending", so it shouldn't show an unmodified file, yet this file appears as "unmodified", when I know that it is? Does anyone know why it does not show me the changes? Please ask if you need more details.

1 answer

1 accepted

1 vote
Accepted answer

The scenario you describe will always occur if you make whitespace changes, but have you SourceTree diff viewer configured to ignore whitespace.

Checking the "ignore whitespace" option only effects the display of the diff - Git still perceives the file as modified.

If whitespace changes aren't the culprit, please let us know what type of file you are dealing with and what changes you are making.

Thanks for the quick reply!

Unfortunately I'm changing more than the whitespace -- it seems to occur with any change I make to the file. It's a large XML file (about 40k lines, 6.2 MB) that looks something like this throughout:

	<String _locID ='75065'>8 Huamincas</String>
	<String _locID ='75066'>6 Huamincas</String>
	<String _locID ='75067'>9 Huamincas</String>

Adding lines, deleting lines, and changing lines all results in the same "unmodified file" issue. I made a copy of the file and gave it a different name to see if it would behave the same, and it does, so it must be something about the file's contents, and not some kind of issue with git mistracking that particular file path or something. The large size was suspect to me, but I have a larger XML (170k lines, 6.5 MB) that is working fine.

Here's a download link to the entire file in question:

Thanks again for your help.

Try opening the terminal and running a git diff command on the file. In previous questions, Atlassian employees have asserted that they are merely rending the output of that command.

It is possible git diff is choking on the size of the file, but you may get an error message that will be helpful.

PS C:\...\mod > git diff HEAD -- "data\stringtabley.xml"

diff --git a/data/stringtabley.xml b/data/stringtabley.xml

index 4ed62ee..de6f294 100644

Binary files a/data/stringtabley.xml and b/data/stringtabley.xml differ

So oddly, it seems to be regarding it as a binary file. Some Googling reveals Git won't recognize UTF-16, so I just converted to UTF-8; I don't think I really had any reason to be using UTF-16.

Thanks for your help!

Thanks for sharing the solution.

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