Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the Git username

I use Git GNU bash, version 4.3.42(5)-release (x86_64-pc-msys) windows 8.1 pro. I gave it a username at the very beginning by typing the command: git config --global user.name"xyz" but then when i've got to Github, this username was already taken, so i tried to change my Git username to be the same as the one Github. Typing the same command then typing : git config --list but it keeps showing the old username, i've tried even to uninstall it, and then retype the same command, but it's the same issue. Someone maybe can tell me how to fix it ?

like image 771
Zine Avatar asked Apr 29 '26 06:04

Zine


2 Answers

The suggestion made above was great, but i managed differently to solve the problem :

I went to the Git GUI, then Edit, Then options and there i've found different button to change the username. That was successful.

like image 66
Zine Avatar answered May 02 '26 03:05

Zine


Look at both the .gitconfig file in your home directory for global settings and also .git/config in a specific project for override values.

In Windows there may be some extra steps to view these files.

like image 33
Mark Stosberg Avatar answered May 02 '26 02:05

Mark Stosberg