'Where does Git Bash get all its host mappings from?

I'm using Git Bash in Windows 8. I can see it has copied C:\Windows\system32\drivers\etc\hosts over to /etc/hosts. Note that /etc/hosts is not a link to C:\Windows\system32\drivers\etc\hosts - you can prove this to yourself by modifying C:\Windows\system32\drivers\etc\hosts and seeing that /etc/hosts is not immediately modified. My guess is that /etc/hosts is copied over from C:\Windows\system32\drivers\etc\hosts when git bash is launched, but that's really irrelevant to this question.

My real question here is why there are other known hosts which do not appear in either of these files:

$ ping host-not-in-files
Pinging host-not-in-files [192.168.3.3] with 32 bytes of data:
Reply from 192.168.3.3: bytes=32 time<1ms TTL=64
Reply from 192.168.3.3: bytes=32 time<1ms TTL=64
^C

Where is Git Bash getting the mapping from host-not-in-files to 192.168.3.3 from?

Note: host-not-in-files is not a literal string - I could just as well have written ping bob or ping fred here - it's just intended to be a hostname that cannot be found in either C:\Windows\system32\drivers\etc\hosts or /etc/hosts. I don't want to post the actual string I use in my PC into stackoverflow for security reasons - just the same reason as why 192.168.3.3 is not a real IP address in my network.

Also note that I have no problems with using the hosts in either C:\Windows\system32\drivers\etc\hosts or /etc/hosts - these are being mapped fine by Git Bash. I just want to know where the other mappings are occurring.



Solution 1:[1]

This "host-not-in-files" entry is not set by git-for-windows, and I don't see it in my git 2.8.1 bash session on Windows.

/etc/hosts is the exact copy of C:\Windows\system32\drivers\etc\hosts.

Solution 2:[2]

in your home directory cd ~ you have a soft link

hosts -> /c/Windows/System32/drivers/etc/hosts

which is not /etc/hosts (don't know why :)) so if you are admin on your computer use

nano ~/hosts        # not /etc/hosts

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 VonC
Solution 2 bortunac