I've seen this but it doesn't work for me. I'm not using Git's version of bash but the one that comes with cygwin, so that could be part of the problem. Here is how I have my tab in Console2 set up:
Title: bash.exe Shell: C:\cygwin\bin\bash.exe --login -i Startup dir: %HOMEDRIVE%%HOMEPATH%
This is my registry entry:
Directory shell Console2 Open Console2 Here command "C:\Console2\Console.exe" -d "%1"
bash always starts in my home directory instead of the directory I'm clicking on, then I have to
cd /cygdrive/d/code ... etc. I tried removing the value in the "Startup dir" field, changing it to %1, %1% with no luck.
I also tried this solution but it didn't work for me either:
Title: bash.exe Shell: C:\cygwin\bin\bash.exe -l
Directory shell Console2 Open Console2 Here command "C:\Console2\Console.exe" -d "%V"
The solutions above work for the versions of bash.exe and sh.exe that are included with Git, but not the versions that are included with cygwin for some reason. Still looking for a reason for this.
I selected an answer below, but I think the second solution above would have worked if I had created the .profile file in the right folder. I kept trying to create it in my normal home directory instead of the home directory used by cygwin, which is why it never executed the script. This led me to believe that the .profile file was unnecessary. The answer I selected (thanks Hugh!) clearly explains how each of the scripts (.bash_profile, .bash_login, .profile, and .bashrc) are used by bash which helped me figure out that I was putting them in the wrong place.