Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I unconfigure Powershell scripts as binary, so I can see differences?

Skip Sailors
Contributor
March 2, 2024

I have PSH scripts in my repositories using a '.ps1' extension.  When I edit one, Sourcetree shows a message that "No changes in this file have ben detected, or it is a binary file, or it is configured to be ignored by the file patterns."  How do I change configuration so that I can see the text difference?

1 answer

0 votes
Martin Runge
Community Champion
June 15, 2026

Hi @Skip Sailors

I would check the file encoding of your PowerShell scripts, as Git and Sourcetree often misidentify .ps1 files as binary if they are saved with a Byte Order Mark or in a specific UTF-16 encoding. Opening the script in an editor like VS Code or Notepad++ and re-saving it with UTF-8 encoding usually fixes the diff view instantly.

It could also be caused by a rule in your local or global .gitattributes file that explicitly treats PowerShell scripts as binary data.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events