SourceTree pending files on initial clone

I'm using sourcetree with a mercurial repo. After an initial clone from bitbucket its telling me I have many pending files, although I haven't touched the clone. In the diff the files look exactly the same, although it thinks every line is different. I've tried "discarding" the change but this makes no difference.

1 answer

1 accepted

This is usually because of line ending issues. Please see my answer here: https://answers.atlassian.com/questions/185169/sourcetree-win-1-0-3-0-what-happened-to-my-line-endings

To summarise, it's because SourceTree was trying to be helpful with its initial setup to default to unifying line endings - however existing repos may be in a state where this shows up as files needing re-committing to get their line endings into a unified LF format inside the repo (but still CRLF in your working copy).

We've stopped setting this by default for the next update and if you don't want to re-commit these files to change the line endings inside the repo then just remove these lines from mercurial.ini in your home directory:

[encode]
**=cleverencode:
[decode]
**=cleverdecode:

Thanks that did the trick. :)

I think I have the same issue as Neil except I just did a clone from my remote repository and we are not using mercurial. The original repo was TFS. Is there a similar approach to resolve this for TFS to Git? The files in question are *.sql files that have specific CRLF at the top and bottom of files.

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

554 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