2

Serious question: I just committed to github and got shocked: Netbeans has transferred my full name and my PRIVATE EMAIL ADRESS (which i never never never ever use in IDEs, websites etc) to github (as committer's name and committer's email adress). How the hell does Netbeans know that ? Some kind of very creepy cookie-reading-gravator-github-social-bullshit-mashup ?

Name and email are visible for the whole world, including google's spiders.

Do you know how this can happen ?

Sanath
  • 4,774
  • 10
  • 51
  • 81
Sliq
  • 15,937
  • 27
  • 110
  • 143
  • 1
    Are you sure it's not the other way around? I'm pretty sure you needed to provide an email-address when you signed up for GitHub. – In silico May 06 '12 at 00:38
  • that's quite logical, but as I said I never use my private email for those thing. Secondly, I haven't provided my full name for github. – Sliq May 06 '12 at 00:40
  • Same thing with phpgof.com, a cloud service. the problem is netbeans. – Sliq May 06 '12 at 00:41
  • 2
    Netbeans would only know your email if you told it. It's not an oracle, it can't magically inuit personal details. Therefore, you told it your email at some point, and have since forgotten. – Samuel Bierwagen May 06 '12 at 00:42
  • @SamuelBierwagen nope, i didnt. But i got the solution. Will edit my post in a few minutes. Thanks for having a view on this issue. – Sliq May 06 '12 at 00:45
  • I'll just answer my own question to help other people with this stupid thing: Solution is here: http://stackoverflow.com/questions/8803714/change-git-commiter-in-netbeans In Win 7, you have to edit .gitconfig in your personal user folder (make hidden files visible first). It's caused because netbeans uses Git's configs. Regardless of any further configs. Don't know what exactly happened, but Git also seems to have messed up my other ssh keys. – Sliq May 06 '12 at 00:49
  • another possible solution to kill unwanted authors/committers (whereever git grabs this infos from) in a win7 environment: delete/change the lines found in win7-user-folder/.netbeans/7.0/config/Preferences/org/netbeans/modules/git.properties – Sliq May 06 '12 at 02:00

2 Answers2

5

I think the best solution is to set the committer's username and email address in the commit dialog in NetBeans, see NetBeans Git Support user guide.

Netbeans reads global .gitconfig file (in your home dir) and .git/config file in you local repository root folder and extracts your username and email from there and uses them wherever necessary (to connect to github when performing push, pull or fetch, when committing to your local repository) but you can override it in the commit dialog if you want to commit under a different username.

4

By default, Git adds your name and email to every commit you make. You can change these either globally or on a per-repo basis using the git config command. Normally, Git doesn't know your name or email unless you explicitly told it, but I don't know if Netbeans configures it for you or not.

git config --global user.name  "John Doe"
git config --global user.email "john@example.com"

However, changing these settings will only affect any new commits you make from that point on. To remove any existing references to your email address from your repo, you will have to edit the commits. See: How do I change the author of a commit in Git?

Once you've done that, you should be able to force push these changes to GitHub.

Community
  • 1
  • 1
hammar
  • 138,522
  • 17
  • 304
  • 385