Git Multi-Account Configuration Guide on Windows

In real-world development, we often need to use multiple Git accounts on the same computer, for example: Personal GitHub account Company GitHub account GitLab account Gitee account If you simply use the default Git configuration, you can easily run into these problems: Using the wrong account when running git push Commit history showing up under a different account Not knowing which SSH Key to use Frequently modifying user.name and user.email across different projects SSH configurations for GitHub, GitLab, and other platforms interfering with each other The most stable solution to these problems is: One account per SSH Key, distinguish accounts through SSH Config, and determine commit identity through project-level Git Config. Below, using Windows as an example, we’ll build a complete Git multi-account workflow. ...

August 11, 2026 · 8 min · Fiery Clouds