5

So this is going to sound pretty foolish, but I'm just trying to be safe. In the link below, it says that the terminal will require us to enter our name and email. Do we enter in our actual name (if so, our full name/with or without spaces/what formatting?) and our actual email, or simply continue to enter in the scripts:

git config --get user.name
git config --get user.email 

as the site tells us?

Here is the link to the site I am referring to:

http://installfest.railsbridge.org/installfest/configure_git

landroni
  • 6,031
L H
  • 51

3 Answers3

12

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.

Thomas Ward
  • 80,112
4

The correct formating is like this :

git config --get user.email "johndoe@company.com"
git config --get user.name "John Doe"
Byte Commander
  • 110,523
4

You enter whatever your want. If you don't want to enter your actual full name, you can use a pseudonym and a fake email.

Those information are useful, for example, if you intent to contribute to project using git. Configuring your full name and email is a way to show in a project who you are and what you have contributed to the project.


The full command are the following :

git config --global user.name "Jacques Chirac"
git config --global user.email "chirac@example.com"

(You can put spaces and whatever formatting you want/need)

hg8
  • 13,580
  • 2
    Don't know, but better use a pseudonym that doesn't exist in real-life (or at least isn't a well-known politician and ex-president of the French Republic). Just a thought... – Byte Commander Nov 16 '15 at 14:54
  • 2
    @ByteCommander are you implying that that Chiracs down the street from me should be barred from naming their son "Jacques"? And if they do go down this path, it would be just cause for example.com to refuse to hire him? – Digital Chris Nov 16 '15 at 21:45
  • @DigitalChris It was just my personal opinion and a well intended advice. He can use whatever example he wants (except Adolf H. probably) of course, but I think that using common names is better in a public place than those of celebrities. He will surely not feel offended when reading this, but in general I prefer the other option. – Byte Commander Nov 17 '15 at 06:49