github account changing on windows

I am using github on windows. I am new at github, so I am a bit confused about accouts. I set up github some times ago (4 months). And I have two github account on github.com

  • username1, myemail1@domain.com
  • username2, myemail2@domain.com

I am creating a repository on github.com with username1 account. Repository name is test. And I am pushing my files to repository. commands:

  • git remote add github git@github.com:username1/test.git
  • git push origin master

And I am opening my github username1 account on github.com web site, and opening tets repository page, but index content modified by username2

I changed username, email from console but username2 is appearing yet.

Is it about ssh? What can I do? I am new.

  • Github create token with 2 factor authentication
  • github v3 API - delete / remove a repo
  • Validation error while submitting app to Firefox Marketplace
  • Git user config file - custom ignore
  • Git push returning error and not prompting for password
  • Deploying with Git/Github
  • Github not picking up change in code, can not commit
  • How to checkout particular pull request
  • One Solution collect form web for “github account changing on windows”

    The GitHub user account which owns a particular repository can be different from the user that makes commits. (You can make commits in someone else’s repository if they give you permission, right?).

    My bet is that your local user (which makes commits) is username2. You’re able to make commits on a repo owned by username1 because you have authorization to do so (you own it ).

    You can check what your local git configuration is using for a username by either

    a) Running git config --global --list OR
    b) Opening ~/.gitconfig in an editor.

    To update your global user name (applies for future commits in ALL local repositories) run, git config --global user.name <username>.

    I can see what the next question is going to be: “What if I want my local git user to change depending on which repository is checked out?” You need to add git configurations per repository. In your repo run git config user.name <username> (Note the absence of the global flag). You might also want to add git config user.email <email> or any other repo specific settings you want.

    Git Baby is a git and github fan, let's start git clone.