Changing the git user inside Visual Studio Code

后端 未结 8 1858
时光取名叫无心
时光取名叫无心 2020-12-04 16:53

The user for my git commits has changed, but I am not able to change that inside of Visual Studio Code.

I changed the global settings in git, but when I want to push

8条回答
  •  盖世英雄少女心
    2020-12-04 17:04

    Press Ctrl + Shift + G in Visual Studio Code and go to more and select Show git output. Click Terminal and type git remote -v and verify that the origin branch has latest username in it like:

    origin git@github.com:DroidPulkit/Facebook-Chat-Bot.git (fetch)

    origin git@github.com:DroidPulkit/Facebook-Chat-Bot.git (push)

    Here DroidPulkit is my username.

    If the username is not what you wanted it to be then change it with:

    git add remote origin git@github.com:newUserName/RepoName.git
    

提交回复
热议问题