Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default git author in Intellij permanently

I want to set the default author on the Version Control window in Intellij. I always need to type again and again when I'm commiting new code.

Is there any way to set that value by default without needing to edit in every commit I make?

Intellij Version Control Window

I've already set git user and email on my ~/.gitconfig

[user]
email = [email protected]
name = waghcwb
like image 594
waghcwb Avatar asked Jan 22 '18 19:01

waghcwb


People also ask

How do I change the author name in IntelliJ?

Go to Settings -> Editor -> Live Templates , click the Plus Icon Button (on the right). In the "Abbreviation" field, enter the string that should activate the template (e.g. @a ), and in the "Template Text" area enter the string to complete (e.g. @author - My Name ).

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.

How do I change my Git repository URL in IntelliJ?

VCS - > Git - > Remotes Popup will open with all repository URLs configured, you can simply edit them or add new one. Save this answer.


2 Answers

If you have set your user.name and user.email in your ~/.gitconfig you can just leave the Author field empty and Git will look in ~/.gitconfig .

like image 121
Christos Batzilis Avatar answered Nov 04 '22 16:11

Christos Batzilis


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]

This will set default git author in Intellij permanently

like image 1
Dulith De Costa Avatar answered Nov 04 '22 17:11

Dulith De Costa