How to change git shell's start directory in windows 7

前端 未结 6 1956
鱼传尺愫
鱼传尺愫 2021-02-05 01:10

I downloaded and installed the programs offered by GitHub including Git Shell.

The problem is that I want to set up the home directory of the Git Shell program to a cust

6条回答
  •  感动是毒
    2021-02-05 01:44

    When I use @ssmith's answer it opens up in the right directory but does not have any of the features of posh-git. When I open it up normally it say s posh-git in the title, when I add this configuration it just says powershell...

    I figured it out, use/create the file

    C:\Users\yourUserName\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

    (the default profile) and then add the line mentioned above

    Set-Location C:\Your\Start\Directory

提交回复
热议问题