I have recently added source control to my project but when I commit changes the author appears to be a user that has no relation to the repository. However its name is my Microsoft account’s Username. I have tried changing the config for git , also changing repo setting in visual studio. Nothing works
How can I start commiting and showing with my GitHub Username?
Note: I also have enabled signing commits
git config --list run at C:\
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
core.editor="C:\\Program Files (x86)\\Notepad++\\notepad++.exe" -multiInst
-notabbar -nosession -noPlugin
core.autocrlf=true
core.fscache=true
core.symlinks=true
winupdater.recentlyseenversion=2.25.0.windows.1
user.name=ProgrammerDim
user.email=dimitritouli@gmail.com
user.signingkey=994CC457AE529B51
gpg.program=C:\Program Files\Git\usr\bin\gpg.exe
git config --list run at repo
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
core.editor="C:\\Program Files (x86)\\Notepad++\\notepad++.exe" -multiInst -notabbar -nosession -noPlugin
core.autocrlf=true
core.fscache=true
core.symlinks=true
winupdater.recentlyseenversion=2.25.0.windows.1
user.name=ProgrammerDim
user.email=dimitritouli@gmail.com
user.signingkey=994CC457AE529B51
gpg.program=C:\Program Files\Git\usr\bin\gpg.exe
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
Most probably your user is not correctly configured in your local git setting and that's why your seeing different username when you commit.
Use following commands to set the global username & email id for git
$ git config --global user.email "email@example.com"
$ git config --global user.name "your-user-name"
If you just want to set it to particular repository then
Open Git Bash.
Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits.
Set an email address in Git. You can use your GitHub-provided no-reply email address or any email address.
$ git config user.email "email@example.com"
Confirm that you have set the email address correctly in Git:
$ git config user.email email@example.com
Follow this article to for more details
Oops I accidently saw the wrong repository...It does not solve the problem
ProgrammerDim username is mapped to dimitritouli@gmail.com while creating github account??
what does
git config --global user.name
&git config --global user.email
returns?So user.mail was not set correctly