- Check if a profile already exists:
Test-Path $profile
- If the result was 'False' then you don't have a profile yet. Create one:
New-Item -path $profile -type file –force
Reference: https://www.howtogeek.com/50236/customizing-your-powershell-profile/
- Right click on the powershell menu bar --> Properties
- Go to the 'Colors' tab
- Edit your background color. I chose a dark grey (RGB = 39, 40, 34)
- You'll need to add a couple functions to your profile. See reference below.
- Once you've added the functions, feel free to change the color assignments (I changed the color for the branch name from "green" to "cyan" because it shows up better on my background)
Reference: https://stackoverflow.com/a/44411205
$colors = [enum]::GetValues([System.ConsoleColor])
Foreach ($bgcolor in $colors){
Foreach ($fgcolor in $colors) { Write-Host "$fgcolor|" -ForegroundColor $fgcolor -BackgroundColor $bgcolor -NoNewLine }
Write-Host " on $bgcolor"
}
Reference: https://stackoverflow.com/a/41954792
- Add the following to your .gitconfig:
[color]
ui = true
[color "status"]
changed = red bold
untracked = red bold
added = green bold
Reference: https://stackoverflow.com/a/22954951