Reputation: 1141
I been using bitbucket for a long time of period and never use github alongside with it, Recently I wanted to use github for particular reason. For github I wanted to setup global email that is different from bitbucket global email. is it possible to setup to two different global email address for both accounts and how do I do that?
Upvotes: 1
Views: 925
Reputation: 31137
I think that you could achieve that by cloning in 2 different directories.
One called bitbucket
and one github
.
And then using .gitconfig
cnditional include to load either the github config or the bitbucket one.
See .gitconfig include documentation
Upvotes: 1
Reputation: 29276
You cannot set up two different emails at a global
level, but yes you can have it at a repository level.
From the command line, change into the repository directory and set your email address as:
git config user.email "[email protected]"
Verify your configuration by displaying your configuration file:
cat .git/config
Upvotes: 1