git-config: Configuring your repository

Hello all,

We said we'd take a look at git-config before keep going. So let's go...
This post will be some kind of notes. I won't explain in a detailed way since it's not difficult. You just need to see the commands and you'll be able to understand what's happening:

This will export your name for all git repositories, don't worry when commiting again.

$ git-config --global user.name "My Name"

Same as above, but for email

$ git-config --global user.email mymail@mydomain.com

Use your smtp server when git-send-email'ing

$ git-config --global sendemail.smtpserver smtp.mydomain.com

Stripping whitespaces before commiting

$ git-config --global apply.whitespace strip

Use the .diff extension when git-format-patch'ing

$ git-config --global format.suffix .diff
VN:F [1.9.0_1079]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.0_1079]
Rating: 0 (from 0 votes)

Leave a Reply