5 Tell Git your credentials

5.1 On Mac

  • Press Command (or Cmd) button and spacebar button simultaneously
  • A Spotlight Search pops up
  • Write: terminal
    • You don’t usually have to write more than a couple of letters, and already then your computer suggests the application Terminal, and you can just press enter to make it launch

Terminal launches. Run the following lines of codes on it (replace your credentials to the lines below):

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Don’t close the Terminal just yet - we’ll need it for one thing in a minute. Press Command + H, which hides the Terminal for now.

5.2 On Windows

  • Press the Windows Key + R on your keyboard
  • Type CMD and press enter
  • Type git-bash.exe

If this does not work, do the following:

  • Press the Windows Key + R on your keyboard
  • Type Git Bash and press enter

A Unix-kind of shell should launch. Run the following lines of codes on it (replace your credentials to the lines below):

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Don’t close the Git Bash just yet - we’ll need it for one thing in a minute. Click on the minus-looking symbol on the upper right corner of the Git Bash window, that will hide the window for now.

In the next chapter, we will tell Git your name and email address.



Creative Commons License
Lightning Fast Git Guide by Ville Langén is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.