How can I make Sourcetree recognize .org files as text?

When I want to check diff of .org files in Sourcetree, nothing is shown. When I mark the file .md, or so, Sourcetree has no problems. In the terminal, the diff with .org file works well. So showing no diff seems to be a problem of the extension for Sourcetree.


2 answers

In your .gitattributes file, try adding:

*.org diff

I thought so, but the problem then should be between .org and git, but .org files are recognized as text by git itselft when used in the terminal. 

I tried your suggestions though, but it does not work. Put the .gitattributes file at the same place as the .gitignore file and entered the text. Still, the window just shows grey. 

Seems logical to me, is there a problem with Sourcetree?

Well, let's see what else. This may not be relevant, since you said git works, but you can check it (UTF-16 vs UTF-8):

Maybe the files are too big?

Try with new changes to .org files?

Another question suggesting it might have problems with committed changes:

If it turns out to be a problem when it's committed, but not when it's unstaged, post some details and vote up this bug:

Thanks for taking care of this problem.

  1. The file is UTF8 with Unix LF, and it is still small.
  2. Then I created a new repo with a .txt file and its duplicate (duplicated in the finder, renamed .org) – both worked in that repo.
  3. So I tried new changes in the .org file, but it stays unreadable. After committing the unreadable changes and adding something new, it still does not show the diff.
  4. So I copied the whole text into a new file and naming this differently but with .org extension, this was recognized. Committing, adding changes etc. works nicely.

I remember that the problem file could be read when I added it to the repo, so something must have gone wrong during the first commit (repo is young).

The contents of the small repo (just this .org file) is not top secret. I will now start a new repo and delete this one, and if this helps, I can send you an archive of the screwed repo to check what went wrong.

Don't send them to me, I'm just a SourceTree user. Might be useful to post it to that bug though:


sorry for mixing that up! Thanks for your help, was very kind!



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