0

On Windows I have installed Git Bash. My HOMEPATH & HOMEDRIVE environment variables are set so that my home directory is M:\. As of now I have my .bashrc & .bash_profile files sitting at M:\ & they work just fine.

My question: Is there a way to have Git Bash look somewhere other than M:\ for .bashrc & .bash_profile without changing my HOMEPATH & HOMEDRIVE environment variables?

For example, I want to keep my system's home directory at M:\ but move .bashrc & .bash_profile to C:\my\new\location.

1 Answer 1

3

Those .bash* files are referenced by HOME, so simply set (create) the HOME environment variable to C:\my\new\location

Then open a bash session and check that your resource files are sourced.

HOMEPATH and HOMEDRIVE will be unchanged.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.