Set startup script of powershell
C:\Users\yourname> New-Item $profile -Type File -Force
Directory: C:\Users\yourname\Documents\WindowsPowerShell
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2021/9/28 14:49 0 Microsoft.PowerShell_profile.ps1
For default bashrc of powershell, it is located in %USERNAME%\Documents\WindowsPowerShell\profile.ps1
++
New-Alias -Name git -Value "$Env:C:\work\Run\PortableGit\bin\git.exe"
Import-Module posh-git
## Refer to https://github.com/dahlbyk/posh-git
https://git-scm.com/book/pl/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Powershell
https://www.develves.net/blogs/asd/articles/using-git-with-powershell-on-windows-10/