In Netbeans 7.1 Git support has been added, however, I don't see a way to change commiter information. Currently, it's defaulting to my system information which is not what I want. Is there any way to change this?
6 Answers
Try setting it in the local gitconfig file .git/config
:
[user]
name = yourname
email = youremail

- 310,957
- 84
- 592
- 636
-
4For me the file was located at `~/.gitconfig`. (Netbeans 7.1 on Windows) Worked like a charm. – Mike S. Mar 17 '12 at 02:13
-
1thanks again, this just prevent my from getting a lot of stress ! netbeans just submitted my real name and very private email due to this. – Sliq May 06 '12 at 01:03
-
2@MikeS. .gitconfig on Windows 7 wasn't recognized by NetBeans 8.0.1 – Puce Oct 27 '14 at 15:37
-
5In NetBeans 8.0.x this file can be accessed via Team > Repository > Open Config OR Right-click Menu > Git > Repository > Open Config – Dazed Dec 04 '15 at 17:37
-
@Dazed I think Global Config – khaled_webdev Feb 22 '17 at 13:40
You can just edit the default text in the combo boxes and NetBeans will remember it for next time. The data is saved in a git.properties
file, for example:
C:\Users\USERNAME\.netbeans\7.1.2\config\Preferences\org\netbeans\modules\git.properties
).
EDIT:
As per the below comment, it seems that the config file's location changed in NetBeans 8 (I don't use NetBeans for a long time already).
Here's an alternative location according to @tzi:
C:\Users\USERNAME\AppData\Roaming\Netbeans\8.0.1\config\Preferences\org\netbeans\modules\git.properties

- 2,954
- 1
- 25
- 32
-
With NetBeans 8.0.1 it didn't use this as default, just for the drop-down – Puce Oct 27 '14 at 15:36
-
it was `C:\Users\USERNAME\AppData\Roaming\Netbeans\8.0.1\config\Preferences\org\netbeans\modules\git.properties` for me – tzi Jun 13 '15 at 17:46
-
-
For Netbeans 8.2 in macOS User directory: `/Users/USERNAME/Library/Application Support/NetBeans/8.2/config/Preferences/org/netbeans/modules/git.properties`or Using Netbeans About **User directory:** beginning path. – joseluisbz Apr 24 '20 at 04:00
this helped me: https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user
Configuring git
To check your git setting, run this command:
git config user.email
# you@there.com
If this email is not correct, you can change the global setting:
git config --global user.email "me@here.com"

- 81
- 1
- 3
-
Cool!!! It is also good to put the form to change the username. follows: git config user.name --global "john.legend" – Rafael Gomes Francisco Oct 29 '14 at 23:29
it worked in netbeans v7.3.1/windows 7 by adding those entries
name = github user name
email = github registered email
in file
C:\Users\[USER NAME]\AppData\Roaming\NetBeans\7.3.1\config\Preferences\org\netbeans\modules\git.properties

- 1,204
- 14
- 16
Windows 7 file location:
C:\Users\USERNAME\.gitconfig

- 1,138
- 3
- 18
- 38
-
-
see the sibling comments; http://stackoverflow.com/a/8803742/107282 | http://stackoverflow.com/a/8803752/107282 – jezmck Oct 24 '12 at 07:28
This is covered in the Git Community Book.
It will work unless what you are trying to achieve is to have two sets of committer information on the OS same user account.
From the page:
[user]
name = Scott Chacon
email = schacon@gmail.com

- 15,077
- 1
- 29
- 54