It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
When an Xcode project file (*.pbxproj) file is selected in the working directory or staging area in SourceTree, it shows it as a binary file and SourceTree doesn't show the comparison with the previous version. Is it possible to configure SourceTree to recognize *.pbxproj as a text file so I can see the comparison without launching an external diff tool?
When a file shows as a binary file, it's usually because it's been encoded as UTF-16. Git and Mercurial can only provide diffs for UTF-8 encoded files, which is why if you encode any other way it treats them as binary.
It's a good idea to change your encoding to UTF-8 for all text files, because as well as not being able to show a diff, Git and Mercurial can't merge UTF-16 files either, so it's much harder to deal with changes across branches. If you have a UTF-16 aware external merge tool you can manually merge things but it does make it harder for you.
When I open the project.pbxproj file (contained in the <projectname>.xcodeproj package) in TextWrangler, the encoding shown in the status bar for the file is UTF-8, so that doesn't seem to be the issue - thanks.
It's odd because I use XCode 4.5.2 too and I always get diffs on pbxproj files. The similar problem here https://answers.atlassian.com/questions/116001/can-sourcetree-diff-markdown-with-file-extension-md-or-markdown/118201 was also a UTF-16 problem, and this has been the case for all other instances of this problem that I've seen too.
The other possibility is that you've marked these files as binary in Git (assuming you're using git), via the .gitattributes file. This can be used to override how Git treats files for diff purposes. Essentially we have no control in SourceTree over what it shown as a text diff and what is considered to be binary, it's all decided by git/hg. Do you have a .gitattributes setup in your repo, and does it mention pbxproj or xcodeproj?
My machine shows diff for .xcodeproj file. I think this always worked for me. I'm using Xcode 4.5.2, within Xcode the project is configured to use git, and using SourceTree version 1.5.6. However, SourceTree won't show diff for .md file, says it's a binary file. So I asked a similar question: Maybe a more general question is "How can the user set SourceTree to diff a file of a given type extension?" |
My machine shows diff for .xcodeproj file. I think this always worked for me.
I'm using Xcode 4.5.2, within Xcode the project is configured to use git, and using SourceTree version 1.5.6.
However, SourceTree won't show diff for .md file, says it's a binary file. So I asked a similar question:
Maybe a more general question is "How can the user set SourceTree to diff a file of a given type extension?"
On my machine SourceTree shows diff for .xcodeproj file. I think this always worked for me.
I'm using Xcode 4.5.2, within Xcode the project is configured to use git, and using SourceTree version 1.5.6.
However, SourceTree won't show diff for .md file, says it's a binary file. So I asked a related question:
Maybe a more general question is "How can the user set SourceTree to diff a file of a given type extension?"
On my machine SourceTree shows diff for project.pbxproj file. I think this always worked for me.
I'm using Xcode 4.5.2, within Xcode the project is configured to use git, and using SourceTree version 1.5.6.
However, SourceTree won't show diff for .md file, says it's a binary file. So I asked a related question:
Maybe a more general question is "How can the user set SourceTree to diff a file of a given type extension?"
As I mentioned in beepscores post, it _may_ be to do with file associations, but the problem is both pbxproj and md/markdown formats work fine on diffs for me. It's hard to 'undo' those associations on Mac OS X. Out of interest, what happens if you try to open the file in a text editor, then restart SourceTree and take a look at the diff from the staging area?
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreSupported 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 ...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.