How to update a GitHub access token via command line

  access-token, git, visual-studio-code, windows

I use the git integration with VSCode and got the notification today that I need to renew my access token. I did so and have my new token (which I obtained through the web interface). Now I need to set my local git configuration to use the new token instead of the old one which will expire in a few days.

The VSCode docs suggest the following:

To execute the ‘GitHub: Set Personal Access Token’ type Ctrl+Shift+p in VSCode to open the command palette and type ‘GitHub: Set Personal Access Token’. You will then be prompted to enter the token generated from GitHub.

This option isn’t available in my git integration in VS code (maybe I need an update?)

How can I do this from the command line?

Source: Windows Questions