Powershell scripts do not show changes in window


I have a modified powershell script.

Although it show on working copy changes windows, it show nothing in the diff window when i select it!

Any suggestions?


S. Mantziaris

3 answers

1 accepted

2 votes
Accepted answer

If you're using PowerGUI use the File->Encoding menu to choose UTF-8. PowerGUI's default encoding doesn't seem to work nicely in Git.

Hi Alan,

changing the encoding had this result:



Any suggestions? (TortoiseGit has no issue diffing the file)

I'm sorry to hear that didn't work for you; I was feeling quite positive after I got it working on my system.

Is it possible you've modified your .gitattributes trying to fix this? A line like *.ps1 -text might be problematic (I'm no expert).

My .gitattributes contains:


When I made the encoding change, I had to do a "garbage commit" -- my term for when a commit doesn't involve semantic change, but rather changes imposed by a tool. My diff looked like this:

My Diff After PowerGUI Encoding Change

The beginning of the diff also contains some funky characters, which I believe are referred to as the BOM by Unicode enthusiasts.


this did the trick.

many thanks.

Are the changes whitespace only?

no, the changes are significant.

is there a git config issue or is it sourcetree?

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