This answer is an addendum to the other answers, and although it answers the commands question like the other answers, it has additional information added which was not touched on in other answers.
As stated in other answers, the full commands to use are in the following format:
git config --global user.email "bob@bob-smith-industries.net"
git config --global user.name "Bob Smith"
As to what to put here specifically, that's up to you. Keep in mind, however, where the git project resides. If the Git project resides on GitHub, BitBucket, or a private GitLab instance, then in order for your commits there to tie to your username, your user.email configuration option should match an email address of which you have registered on those sites.
If the repository owner wants you to be using a specific name and address for yourself, then you may also wish to set this here as well.
Note that this affects every single git repository you use. Most of the time people and projects don't care, but sometimes they do. Make sure what you set here is 'OK' and valid for all the git projects you work on.
--getwill not update anything, you likely wantgit config user.email "johndoe@company.com". – Paŭlo Ebermann Nov 16 '15 at 16:13