how-do-i-push-to-github-under-a-different-username

https://stackoverflow.com/questions/13103083/how-do-i-push-to-github-under-a-different-username

 

https://github.community/t/git-bash-still-pushes-repo-with-old-username/471/5

 

Solution 1.

Locally:

git config credential.username "new_username"

Globally:

git config --global credential.username  "new_username"

Solution 2. (In case solution 1 doesn’t work):

git remote set-url origin "https://new_username@github.com/new_username/github-repository-name.git
posted @ 2020-08-24 11:39  ls1519🎈  阅读(95)  评论(0编辑  收藏  举报