Git Bash
is used in the example. Sometime you need to change the location of
your default Git directory to locate your .ssh
keys for easy access. This can
be done as follows:
Via Git Bash
Use git bash to change HOME
to C:\Users\ybk
. You can use pwd
or echo
$HOME
to check your current HOME
directory.
pwd
setx HOME "/c/Users/ybk/"
As a reminder, this will change the HOME
directory for all programs that need
access to HOME
directory such as Emacs, Vim
etc.
Via menu options
This is for Windows user. The steps are:
- Search for
Git bash
- Right click
Git bash
to open file location or Γ₯pne filplassering - Explorer will be open and right click
Git Bash
to select Properties or Egenskaper - At target remove
--cd-to-home
from"C:\Program Files\Git\git-bash.exe" --cd-to-home
- At Start in put the path of the directory you want to start in eg.
C:\Users\ybk
or%HOMEDRIVE%%HOMEPATH%
if you prefer to useHOME
directory as specify inPATH
. You can read it here on how to change home path or using thesetx
above.