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
--open-shell
to --open-shell=c:\your_dir
1.Open GitHub Windows client.
2.Click tools (at the top of the window) and select 'Options'.
3.There you will find 'default storage location'. This is where Git Shell starts when you run it.
According the article below (in the "Posh-Git and PowerShell" section) you should be able to create a Documents\WindowsPowerShell\GitHub.PowerShell_profile.ps1
file that will start when your GitHub PowerShell starts. In that file you can add the Set-Location c:\path\to\repo
command.
For what it's worth, in case anyone comes across this but has a Bash shell, adding the command cd /path/to/repo
to ~/.basrc should do the trick.
http://haacked.com/archive/2012/05/21/introducing-github-for-windows.aspx
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
Piotr Perak directions are accurate. however, for newer versions, you have to update the "Clone Path".
Other answers didn't work for me, and I am on Windows 10. So for those looking for another way I added a line to my ~/.bashrc: cd /c/myfoldername
Works like a charm