113

I am using the Git plugin for Eclipse. I have several authors and committers which are displayed when I start typing in those fields.

How can I provide changes to this list, or remove some author or committer?

Also I want to set my default author and committer which will be displayed by default.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Dmytro Danylyk
  • 19,684
  • 11
  • 62
  • 68

5 Answers5

191
  1. Click Window > Preferences > Team > Git > Configuration
  2. Click Add Entry and enter the key value pairs:

    • Key: user.name
    • Value: YourUsernameHere

      And

    • Key: user.email
    • Value: YourEmailHere
Sarcares
  • 57
  • 1
  • 2
  • 11
Guillermo Garcia
  • 2,396
  • 1
  • 18
  • 23
  • 1
    I had to [set a HOME environment variable](https://www.eclipse.org/forums/index.php/t/598634/) before I could add a new entry. Then this worked for me. – jaco0646 Aug 27 '15 at 21:36
  • 3
    Restart eclipse after adding configuration. – Sharan De Silva Aug 30 '18 at 11:42
  • Note that this solution only applies to a single git repository at a time. If you use multiple repositories, you should use the global solution in the answers provided by GorvGoyl or GoZoner. – E-Riz Aug 23 '22 at 16:02
24

Each developer should perform:

git config --global user.name "<name of user>"
git config --global user.email "<email of user>"

If you want to change the author of an existing commit, look here

Community
  • 1
  • 1
GoZoner
  • 67,920
  • 20
  • 95
  • 145
16

Changing Your Committer Name & Email Globally

You can run the "git config" command with the --global flag; this will make sure all of your future commits use the given information:

$ git config --global user.name "John Doe"
$ git config --global user.email "john@doe.org"

Changing Your Committer Name & Email per Repository

If you want to use special settings only when working in a certain repository, you can simply omit the --global flag. This makes the configuration valid only in that repository:

$ git config user.name "John Doe"
$ git config user.email "john@doe.org"

Git Cheatsheet: git for dummies

GorvGoyl
  • 42,508
  • 29
  • 229
  • 225
  • 2
    This is a much better answer for those using multiple workspaces and need different Authors/Committers for each workspace instead of a global Eclipse setting. – Etep Mar 07 '18 at 08:54
  • 1
    Agree with @Etep. I've configured both global and local accounts. To check if you're using correct repo specific account from within repo, run `cat .git/config` or `git config --local user.name` – rsinha Jun 27 '20 at 08:22
14

EGit should ask you the first time you commit something. But you can always change it later on, see here: http://wiki.eclipse.org/EGit/User_Guide#Identifying_yourself

robinst
  • 30,027
  • 10
  • 102
  • 108
9

In Eclipse v4.4 (Luna) it will work like the below way.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Krutik Jayswal
  • 3,165
  • 1
  • 15
  • 38