Change Git commiter in Netbeans

前端 未结 6 1679
南笙
南笙 2021-01-30 09:03

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

相关标签:
6条回答
  • 2021-01-30 09:25

    Windows 7 file location:

    C:\Users\USERNAME\.gitconfig
    
    0 讨论(0)
  • 2021-01-30 09:32

    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

    0 讨论(0)
  • 2021-01-30 09:36

    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
    
    0 讨论(0)
  • 2021-01-30 09:41

    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\netbean‌​s\modules\git.properties

    0 讨论(0)
  • 2021-01-30 09:46

    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"
    
    0 讨论(0)
  • 2021-01-30 09:50

    Try setting it in the local gitconfig file .git/config:

    [user]
            name = yourname
            email = youremail
    
    0 讨论(0)
提交回复
热议问题