Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set user.email and user.name in Intellij 14 with GIT integration?

I have IntelliJ 14 with GIT integrated. git push command shows the Author as unknown. How do I set the following two parameters in my IntelliJ IDE?

git config --global user.name "Sam Smith"
git config --global user.email [email protected]
like image 597
maverick Avatar asked Jun 06 '15 00:06

maverick


People also ask

How do I set Git credentials in IntelliJ?

In the Settings/Preferences dialog Ctrl+Alt+S , select Appearance and Behavior | System Settings | Passwords on the left. Select how you want IntelliJ IDEA to process passwords for Git remote repositories: In native Keychain: select this option to use native Keychain to store your passwords.


5 Answers

  1. Ctrl + K to open commit dialog
  2. Type following pattern into "Git / Author:" dropdown field, replacing parts with personal data(keep space and angle brackets characters):
Name Surname <Email> 
like image 65
Constantin Zagorsky Avatar answered Oct 07 '22 17:10

Constantin Zagorsky


You can set the username and email for Intellij 14 with GIT integration as follows. This worked for me.

Go to your project where git is initialized.

Then enable the hidden folders and find ".git" and go inside the folder.

Find the file called "config" and add below code and save.

[user]
      name = username
      email = [email protected]
like image 39
Dulith De Costa Avatar answered Oct 07 '22 17:10

Dulith De Costa


When you are in the commit dialog, just using Ctrl+Space to open the user list and choose one.

enter image description here

like image 44
Kami Wan Avatar answered Oct 07 '22 18:10

Kami Wan


Assuming that you have installed git from git-scm.com.

For Linux or Mac OS use terminal.

For Windows environment: Use git bash (comes together with git installation) or use Powershell.

Run:

git config --global user.name "Sam Smith"
git config --global user.email [email protected]

Tricky part is: You have to commit at least one time from terminal.

git add my_awesome_file
git commit -m "My commit message"

VIOLA! Now your author is shown in IntelliJ commit panel.

(Note: If you work with different repositories using different emails don't use global configuration)

like image 31
Ardit Isaku Avatar answered Oct 07 '22 17:10

Ardit Isaku


If I were you, I would just copy and paste those two lines in your command prompt; that will set the appropriate values, including for the IDE.

If you really want to set it via the IDE for some reason, I would follow the instructions here.

like image 26
David Deutsch Avatar answered Oct 07 '22 17:10

David Deutsch