Saturday, November 30, 2019

Git bash home directory different from Git extension than Git Bash


Reference:
https://stackoverflow.com/questions/8560064/git-bash-home-directory-different-from-git-extension-than-git-bash

https://danlimerick.wordpress.com/2011/07/11/git-for-windows-tip-setting-home-and-the-startup-directory/

# Set up USER's home directory

if [ -z "$HOME" -o ! -d "$HOME" ]; then

  HOME="$HOMEDRIVE$HOMEPATH"

  if [ -z "$HOME" -o ! -d "$HOME" ]; then

    HOME="$USERPROFILE"

  fi

fi