How do I edit the email in git?

Asked

Viewed 4,298 times

1

I had put an email as the default in the github account, and consequently in the git global config, but the problem that I closed the yahoo account and included Hotmail as the main one in the github settings, is giving this problem. I searched but I couldn’t find any commands to edit the email. Anyway, as I edit the new email in git?

como editar o email no git?

1 answer

3

A simple way is to edit the CONFIG file inside the . git folder

There you edit the following:

[user]
  name = seu nome vem aqui
  email = aqui vai seu email

There are commands via command line, but this should solve your problem.

Updating

This change goes to a specific repository. For a global configuration you can make the same change to the file. gitconfig that is inside your home.

Whether windows should be c:\User\seu usuário.

Whether linux should be /home/seu_usuario.

You can still do this via command line:

git config --global user.name "SEU NOME"
git config --global user.email "SEU EMAIL"

But as I mentioned, the end result will be the same.

  • but I downloaded the sourcetree...

  • No problem, you will have the file anyway inside the .git. folder Note that this folder is hidden by default. Enable hidden file display.

  • I saw him here. But I thought it was weird because I had the recent email there. But when commit and push gives the same problem...does not have an email command and password to change?

  • The password you must change in your remote repository. In the local no password.

  • I don’t know what I do... You’re making mistakes yet...

  • Can you sign in to github via the web? Note that you should use the github user and password, no matter what the email is in this case

  • I can log into github. normal.

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.