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
  • 429
  • 6
  • 15
  • 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

1

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

$ git config --global user.name "First Last"
Simon S.
  • 757
  • 5
  • 17
1

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
  • 11,075
  • 2
  • 25
  • 46