# IT:AD:Git Bash # * [[../|(UP)]] * See also: * [[IT/AD/Git/]] * [[IT/AD/Git for Windows/]] * [[IT/AD/SH/]] * [[IT/AD/SSH/]] Git is basically a collection of scripts written for the Linux environment. To run those scripts, you need a Linux shell emulator. "Git bash" is a `msys` shell included in [[IT/AD/Git for Windows/]], and is a slimmed-down version of `Cygwin`, whose only purpose is to provide enough of a POSIX layer to run a bash (TODO:Check whether the new [[IT/AD/MsysGit/]] project is still using Cygwin...I think not). Even if you use a Git GUI of some kind to invoke Git commands, when setting up [[IT/AD/Git/]] it's common to use [[IT/AD/Git Bash/]] to access [[IT/AD/SSH/]], [[IT/AD/SSH-KEYGEN/]], etc. to set up the required [[IT/AD/SSH/]]. If you add `%userprofile%/AppData/Local/Programs/Git/usr/bin/` to the *User* PATH [[IT/AD/Environment Variables/]] you don't need [[IT/AD/GIT BASH/]] for those steps -- you just need a [[IT/AD/Powershell/]] CLI to activate [[IT/AD/SSH-KEYGEN/]], etc. ## Notes ## Git Bash is: * When installed by [[IT/AD/Git for Windows/]], is installed to: `%userprofile%/AppData/Local/Programs/Git/git-bash.exe` * Within the Shell, `git` is a known command * `$HOME` is defined (pointing to `~`, ie, `%userprofile%`) * It is able to activate the programs within `%userprofile%/AppData/Local/Programs/Git/usr/bin/`, such as `ssh.exe` #### Git-Bash.exe versus SH.exe I don't yet understand the exact difference between: `%userprofile%/AppData/Local/Programs/Git/git-bash.exe` and `%userprofile%/AppData/Local/Programs/Git/usr/bin/sh.exe` Notice that `git-bash.exe` can automatically find the apps in the `usr/bin` directory, whereas `sh.exe` won't, until you start it using the login switch: `sh.exe -l` ## Resources ## * http://stackoverflow.com/questions/22310007/difference-between-git-scm-msysgit * http://stackoverflow.com/questions/17807485/what-is-the-exact-meaning-of-git-bash