Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

shinoto October 3, 2016

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

1 vote
shinoto October 5, 2016

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.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2016

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

shinoto October 6, 2016

Seth, 

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

 

Maria

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 4, 2016

In your .gitattributes file, try adding:

*.org diff

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

shinoto October 4, 2016

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?

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events