In some lan house when I try to do a commit on GitHub using git bash, after I log in and do the push origin, they appear without my name/login, and I don't need to log in again to do other push. Ps: This work in private repositories too.
1 Answers
When you install git and use it for the first time, you should set the author name and email with the following commands:
git config --global user.name "Mona Lisa"
git config --global user.email "email@example.com"
You either did not set these or you set the email to something other than the one you have configured with your GitHub account. You have two options to fix this:
Register the email that you already used with your GitHub account.
Change your email in your local git config. Then edit all previous commits with that email. See How to change the author and committer name and e-mail of multiple commits in Git? for details about how to do that. Finally, you can push the updated commits with
git push -f
.Note: This option will modify the entire git history. If any of your previous commits were merged into
master
or pulled by another developer, they will have a lot of work cleaning up their own local branches. Only use this option if you can mitigate any such problems.

- 81,660
- 23
- 145
- 268