bessarabov
bessarabov

Reputation: 11871

How to specify different emails for different git repos on the same machine

Im my home directory I have .gitconfig with these lines:

[user]
    name = Ivan Bessarabov
    email = [email protected]

So, every commit I make has this name and email information. But I have several repo on the same computer that need to have different email address.

How can I specify different email address for some repos?

Upvotes: 0

Views: 213

Answers (1)

KL-7
KL-7

Reputation: 47618

Run this command in your repository directory:

git config user.email "[email protected]"

Without --global option it'll configure email specific for this repository (it'll be stored in .git/config file inside this repository directory).

Upvotes: 2

Related Questions