Search code examples
githubgithub-for-windowsgithub-for-mac

Github commits from different PC's


Quick question, if i have different PC's which share the same/different projects which I would like to make commits to.

How can I make sure that all the commits will be made from my GitHub account owner? Right now, it commits with the PC username instead of my GitHub account.


Solution

  • You can set your Git username the following way:

    1. Open Git Bash.

    2. Set a Git username:

      $ git config --global user.name "Mona Lisa"

    3. Confirm that you have set the Git username correctly:

      $ git config --global user.name

      Will output Mona Lisa

    Reference: https://help.github.com/articles/setting-your-username-in-git/