How do you set java version in windows git bash?

Let’s say you want to try other Java versions but you don’t want to alter the Windows environment variables. Steps: Go to your home folder. i.e. C:\Users\MyAccountName Edit the .bashrc file and add the following code below. #For example: export JAVA_HOME=’/c/Program Files (x86)/Java/jdk1.8.0_45′ export PATH=$JAVA_HOME/bin:$PATH .bashrc and .bash_profile are files created during the git-bash installation.

How to Shorten Git Bash Prompt (Windows)

An alternative answer is to go to C:\Program Files\Git\etc\profile.d and open the git-prompt.sh file. It contains the default configuration/prompt for Git Bash. if test -f /etc/profile.d/git-sdk.sh then TITLEPREFIX=SDK-${MSYSTEM#MINGW} else TITLEPREFIX=$MSYSTEM fi if test -f ~/.config/git/git-prompt.sh then . ~/.config/git/git-prompt.sh else PS1=’\[\033]0;$TITLEPREFIX:$PWD\007\]’ # set window title PS1=”$PS1″‘\n’ # new line PS1=”$PS1″‘\[\033[32m\]’ # change to green # PS1=”$PS1″‘\u@\h … Read more

On Windows what is the difference between Git Bash vs Windows Power Shell vs Command prompt

Git bash is bash, which is IIRC also the default shell on MacOS. It is not the default shell on Windows, although several implementations exist (CygWin, MinGW, …). Git is bundled with a number of POSIX (UNIX/Linux/etc.) utilities in addition to bash; in order to avoid “collisions” with similarly named Windows commands, the most common … Read more

tech