How to change the git bash username on Windows?

You can use the ssh_config facility to specify a different username. See an ssh_config manpage for details, but briefly:

Create the file ~/.ssh/config, and put just this line in it:

User caesar

If you have different usernames for different hosts, you can use the Host setting to specify different usernames, including the default one:

Host rome1
  User caesar
Host rome2
  User brutus
Host *
  User romeo

Normally, the ~/.ssh/config file has to have mode 600, but that doesn't seem to be necessary for the Git windows version.


To change windows username also with Git bash username (not for upper case):

  • Open Command prompt
  • Enter netplwiz
  • Select the windows user account and click the Properties button
  • Enter the new name for the account
  • Save and restart your computer