Same files shown as different & can't reset

I am trying to pull the changes from remote repo and have ran into this issue that local files can't be overwritten for some reason. I've tried using Discard option - it executes but does nothing.

As you can see from screenshot I'm attaching files are pretty much identical when I look into direct compare - but for some reason they always remain as "Uncommited changes" - if I try Discard option on file - it also executes but the file still stays in Working Copy Changes.

How to solve this issue?

Screenshot:

2 answers

1 accepted

Answer by Ricardo M [Atlassian]:
-----------------------------------------

Hi,

This looks like a difference in line ending conversion settings - either since this file was committed, or it was committed by someone else who had different settings. The file itself isn't modified (which is why discard won't work), it's just that the line ending conversion would produce a different result with the user's current settings.

So either core.autocrlf has changed (or file was committed by someone else with different settings), or .gitattributes has.

The easiest way to resolve it is make sure those settings are as desired now and commit, 'baking in' the new line ending conversion preference.

Cheers,

Ricardo

This may have something to with Whitespace - as soon as I check "Ignore whitespace" files are the same (although still reported in Working Copy Changes). Any idea on this?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

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

561 views 1 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