Usually I start it up and I'm located in my windows user directory. I can see all my project folders with a quick ll
. The last few times I've used it, though, I seem to be stuck in some pseudo linux environment. pwd
says I'm at /
. And if I cd ..
I go nowhere.
And none of the folders look like I'm on windows. What is going on here?
Buttle@butkus MINGW64 /
$ ll
total 3412
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 bin/
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 cmd/
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 dev/
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 etc/
-rwxr-xr-x 1 Buttle 197609 140800 Oct 19 20:06 git-bash.exe*
-rwxr-xr-x 1 Buttle 197609 140288 Oct 19 20:06 git-cmd.exe*
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 mingw64/
dr-xr-xr-x 9 Buttle 197609 0 Feb 2 01:35 proc/
-rw-r--r-- 1 Buttle 197609 57831 Oct 19 20:17 ReleaseNotes.html
drwxr-xr-x 1 Buttle 197609 0 Feb 2 01:35 tmp/
-rw-r--r-- 1 Buttle 197609 968936 Oct 29 14:13 unins000.dat
-rwxr-xr-x 1 Buttle 197609 1300779 Oct 29 14:09 unins000.exe*
drwxr-xr-x 1 Buttle 197609 0 Oct 29 14:13 usr/
Buttle@butkus MINGW64 /
$
As stated above, I'm using Windows. But the reason I'm confused is that I used to start out inside my regular Windows filesystem's user directory, from which I could just cd into the project directory. Now I don't know where I am. pwd
says I'm in the root directory but I cannot find any of my Windows filesystem or any of my git projects. Git UI for Windows (again, on Windows) is working fine but I prefer the command line.
Edit: Notes on solutions
Thanks to @Tim Biegeleisen for his answer. I also found this solution: https://stackoverflow.com/a/10652224/631764
I edited the original Git Bash shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git
and removed --cd-to-home from the start up options. Then I changed the "Start in" section to go to my projects directory, so that it now looks like this: %HOMEDRIVE%%HOMEPATH%\Projects
I had to delete my Taskbar icon - it had somehow gotten disconnected from its roots - and then after pinning the Git Bash shortcut to my taskbar, everything worked as expected. If it becomes disconnected again, I will just delete and restore the Taskbar pin again.