mirror of
https://github.com/git/git.git
synced 2026-02-02 05:52:45 +00:00
The idea of `git-bash.exe` automatically running the Git Bash in the home directory was to support the start menu item `Git Bash` (which should not start in C:\Program Files\Git, but in $HOME), and to make that behavior consistent with double-clicking in `git-bash.exe` portable Git. However, it turns out that one of the main use cases of portable Git is to run the Git Bash in GitHub for Windows, and it should start in the top-level directory of a given project. Therefore, the concern to keep double-clicking `git-bash.exe` consistent with the start menu item was actually unfounded. As to the start menu item: it can easily be changed to launch `git-bash.exe` with a command-line option. So let's introduce the --cd-to-home option for that purpose. As a bonus, the Git wrapper can now also serve as a drop-in redirector /bin/bash.exe to provide backwards-compatibility of Git for Windows 2.x with 1.x: some 3rd-party software expects to find that executable there, and it also expects it to leave the working directory unchanged. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>