Below command will remove Git credentials such as PAT globally.

git config --global --unset credential.helper

While the one below will remove stored and cached Git credentials from specific repository you are in.

git config --unset credential.helper

After removing the credentials, you can reintroduce the new PAT by setting the remote url for origin or any other branch you are using as below:

Use git set-url to set the upstream url for pushing and fetching.

git set-url origin https://Your-PAT-here@>

The git remote -v command is used to view the remote repositories associated with your Git repository. It shows the names and URLs of the remote repositories that your local repository is configured to interact with.

git remote -v

You should get an output similar to below. This shows the urls associated with your repo and if the PAT tokens (before @ sign and after https://) look updated you are golden.

origin (fetch)
origin (push)