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.

Thanks!

2 answers

In your .gitattributes file, try adding:

*.org diff

https://git-scm.com/docs/gitattributes

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): https://answers.atlassian.com/questions/116001

Maybe the files are too big? https://answers.atlassian.com/questions/327337

Try with new changes to .org files? https://answers.atlassian.com/questions/16882764

Another question suggesting it might have problems with committed changes: https://answers.atlassian.com/questions/21630283

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: https://jira.atlassian.com/browse/SRCTREEWIN-5307

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: https://jira.atlassian.com/browse/SRCTREEWIN-5307

Seth, 

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

 

Maria

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

699 views 0 4
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