# Is it possible to have cygwin ignore the Windows HOME environment variable

cygwin;

As part of installing EGit, I had to set a HOME environment variable in Windows. This caused a problem whereby cygwin considers the HOME environment variable in Windows more important than the value in /etc/passwd. As a result, cygwin thinks my HOME directory in cygwin has moved from its previous location to my Windows user profile folder. I'd rather keep my cygwin files separate as my user profile folder is cluttered enough already but it doesn't seem to be possible to do so.

Is there any way to have cygwin use the value from /etc/passwd instead of the HOME enviroment variable?

# Set the user id
USER="$(id -un)"  to # Set the user id USER="$(id -un)"
HOME=$(eval echo "~$USER")