
As the picture, there is a long blank before ">" and the script, how could I solve this? Thank you!
I am having a similar problem as @pharazone. Only Posh-Git isn't indicating anything, for me, as far as being in a git repo. However, I am in a git repo as doing a git status shows:

To get the version of posh-git, run Get-Module. Also, have you imported posh-git?
Thank you for supplying me with the Get-Module command. I've issued both Get-Module posh-git and Get-Module poshgit (since I'm not sure which I should be using). It produces nothing.
I'm guessing I've failed to import posh-git. I'm sorry, I'm enough of a novice to now know how I should import it.
@rfalanga No worries. Once you've imported it, you can run the Add-PoshGitToProfile -AllHosts so that the next time you start PowerShell, posh-git will auomatically get imported.
@rkeithhill thank you very much for your help!
I believe I've imported it. I've just ran Add-PoshGitToProfile -AllHosts, but got this warning:
WARNING: Skipping add of posh-git import to file 'C:\Users\rodf\OneDrive\Documents\WindowsPowerShell\profile.ps1'.
WARNING: posh-git appears to already be imported in one of your profile scripts.
WARNING: If you want to force the add, use the -Force parameter.
What should I do about this?
Thank you again, @rkeithhill, that took care of it.
What should I do about this?
Those warnings were just telling you that your profile already imports posh-git. So you're set.
@pharazone What environment are you running in? Is that the PS Console, PS in Windows Terminal, PS in VSCode Terminal, PS in VSCode PS Integrated Console or something else?