I have noticed something quite odd that I haven't seen before while using Git in PowerShell. I have a git repository that I am committing code to. Whenever I run git status
to see the changed files, I see that the text in the console is offset by one character onto the previous line. I also did not re-size the window. Here is an example of what I am seeing:
The word "modified" is offset back onto the previous line by one character.
I thought this was an issue in PowerShell, but after going through the properties of the window, I haven't been able to come up with anything that works and this only occurs when it is listing out the modified files (from what I can tell).
Why is Git offsetting the text like this in PowerShell and how can I fix it?
- PowerShell Version:
5.1.18362.1171
- Git Version:
2.29.2.windows.3
Update #1
As asked by @Bassie in the comments, I ran git config --list --show-origin
[1] in order to list out the contents of the git configurations and I got the following results:
There does not seem to be any options within the config file that would do something like this.
I also noticed that if I put PowerShell into "Legacy Mode," then the formatting works as expected. This result lends credence to the idea that this may be a PowerShell issue rather than a Git issue. My question still stands above, if anyone has any ideas on how to fix this as this issue doesn't appear on another machine I have using PowerShell and Git.
Update #2
So, after running git config --list --show-origin
, if I run git status
again, then the formatting issue fixes itself. However, if I re-open up the PowerShell window and just run git status
, then the formatting issue arises again. This may be an issue potentially with Git actually.