One of the things I had to do when getting my first job was configuring Git. Unless you setup your name and email address Git will take it from the environment. This is important because every Git commit uses this information and if it's not setup correctly it will not be linked to your Github account. Hence if you have a profile picture it won't show.
There are 2 ways to do it:
1. Globally
Open the command line and run the following commands with your name and email.
To setup your username:
$ git config --global user.name "Stefi Rosca"
To setup your email:
$ git config --global user.email "stefi.rosca@me.com"
In this case you only have to do it once and Git will always use this information for anything you do on that system.
2. Repository-specific
From the command line, change into a repository directory where you want to make this change and then run the commands as below.
To setup your username:
git config user.name "Stefi Rosca"
To setup your email address:
git config user.email "stefi.rosca@me.com"
To test that you set it up correctly you can run in your in a specific Git terminal git config user.email
.
Make sure you change the name and email in the example above to yours.
For more information check out chapter on Getting Started from the Pro Git book
Top comments (3)
Thanks, will do in the future.
Hi, I have out this into good use now! Thank you!
Congrats π₯³