Logout and login as another user git bash

I want to logout from Git bash and login it again as another user .

I have googled but can’t find any solution.

  • Why is it considered good practice to describe git commits in the present tense?
  • How do I export a specific commit with git-archive?
  • Understanding git init
  • Github + Jenkins >> How to trigger build on “Commit and Push” in code repository?
  • Why do I have to “git push --set-upstream origin <branch>”?
  • Manually sync branch when Bitbucket fails
  • Should you commit .gitignore into the Git repos?
  • How do I take a GitHub pull request and simply download that as a separate project?
  • .gitignore - ignore file starting with ~
  • Transform a combined diff into a patch
  • error: gnutls_handshake() failed GIT repository
  • What are common antipatterns of using Git?
  • 2 Solutions collect form web for “Logout and login as another user git bash”

    You don’t have to “logout” or “login”: regarding git, who you are is determined by:

    git config user.name
    git config user.email

    Change those two settings while being in a repo, and you are someone else, when it comes to creating commits.

    That has nothing to do with git remote -v, that is with the user account you will use to push to the upstream repo.

    • for an https url, you can simply specify a new user
    • for ssh, you would need a ~/.ssh/config file referring to multiple private ssh keys (also described here).


    git config --global user.name [Your User name]
    git config --global user.email [Your Email]
    Git Baby is a git and github fan, let's start git clone.