How to change my Git username in terminal?

后端 未结 13 1859
予麋鹿
予麋鹿 2020-12-07 07:17

I was pushing and pulling from git in Terminal then I changed my username on github.com. I went to push some changes and it couldn\'t push because it was still recognizing

13条回答
  •  旧时难觅i
    2020-12-07 07:19

    usually the user name resides under git config

    git config --global user.name "first last"
    

    although if you still see above doesn't work you could edit .gitconfig under your user directory of mac and update

    [user]
            name = gitusername
            email = xyz@xyz.com
    

提交回复
热议问题