Powershell scripts do not show changes in window

Hi,

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?

Regards,

S. Mantziaris

3 answers

1 accepted

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:

Before:

After:

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:

*.ps1diff
*.ps1text

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.

HTH,
Alan

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 Join to answer
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 ...

258 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot