4

Is it possible to have multiple git accounts in Eclipse(egit) and choose which one to use each time?

Example:
I currently have a git account, with username: workuser and email: workuser@company.com and this account is used for the company's repositories.

I want to use another account which will be used for my github repositories and will not have any relation to the first account (workuser), e.g. username:githubuser and email: anothermail@something.com

Is it possible to have both accounts and choose each time which account will be used in order to work on the related repositories(different for work and github) ?

Burkhard
  • 14,596
  • 22
  • 87
  • 108
dimzak
  • 2,511
  • 8
  • 38
  • 51

1 Answers1

1

I don't know about egit, but by default, git config (without --global) stores values in repository-specific file, so the only thing you need to do is:

$ cd project-repo
$ git config user.name "<name>"
$ git config user.email "<mail>"
Patryk Obara
  • 1,847
  • 14
  • 19