0

I played with git bash few months ago and I don't know how I accidentally set my name to "Your-Name"( =/ ).

Now every time I commit a change to my repos, It's show that "your-name" commit a change.

BTW - If i create a repo through android studio, It show like My actual username created the repo, but if I commit any changes and push It shows like "Your-Name" commited the changes.

How can I fix this and change to my actual github username?

ScrapeW
  • 489
  • 8
  • 16
  • 3
    Does this answer your question? [Setting up Git User Name](https://stackoverflow.com/questions/41002414/setting-up-git-user-name) – Simon S. Apr 29 '20 at 10:04

2 Answers2

5

You can see your configuration information like below. Refer to Git documentation

$ git config --list
user.name=John Doe
user.email=johndoe@example.com
color.status=auto
color.branch=auto
color.interactive=auto
color.diff=auto
...

Configuration information your user name, email

$ git config user.name
$ git config user.email

For changing your settings globally, across all repos:

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

For changing your settings only to current repo:

$ git config --local user.name "John Doe"  #if you omit --local also, by default it is local
$ git config --local user.email johndoe@example.com #if you omit --local also, by default it is local
Venkataraman R
  • 12,181
  • 2
  • 31
  • 58
1

According to the documentation, open a git bash prompt an run:

$ git config --global user.name "First Last"
Simon S.
  • 931
  • 1
  • 7
  • 21