How to change my Git username in terminal?

后端 未结 13 1790
予麋鹿
予麋鹿 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条回答
  •  执笔经年
    2020-12-07 07:31

    Please update new user repository URL

     git remote set-url origin https://username@bitbucket.org/repository.git
    

    I tried using below commands, it's not working:

    git config user.email "email@example.com"
    git config user.name  "user"
    

    OR

    git config --global user.email "email@example.com"
    git config --global user.name "user"
    

提交回复
热议问题