GitHub: Separate credentials for two accounts on Windows
The conditional include that I detail here is only for commit authorship (user.name/email).
This has nothing to do with authentication (credentials: username/password)
Those are probably cached in a credential manager (like the linux osx-keychain)
Check the output of:
git config credential.helper
If you can, use instead SSH keys per environment, as I illustrate there: then you can easily maintain different identities for the same remote repo (github.com)
Note: the GCM (Git Credential Manager) installed alongside Git for Windows does not, as stated in issue 363, support multiple users per Uri.