I have changed the username and email in git config via
https://help.github.com/articles/setting-your-email-in-git/
When I check the config file with git config --global user.name or email it is showing the correct email and username.
The commits in my project are linked to my github account while in the home page of github it is shown as previous_user pushed to master.
Why are commits linked to me while the pushes are linked to previous user.
I will be really very thankful if someone helps.
Related
What is the difference between the local account that I set in git bash with git config --global user.name and my actual github account login. I have a test repo, in there I have added a few collaborators. When I push to the repo, the history will show my local name and not my github account username. How come ?
GitHub is not git. GitHub is a remote repository management application. It has its own authentication and account system. You can push git repositories to it so that they can be shared and controlled.
The "local" variables that you set through git config are ways to make it faster to set the author of a commit.
There is nothing stopping you from pushing commits authored by someone who is "not you" to a GitHub remote that you control. I believe they will be associatively "linked" if the emails match, but it's not enforced or required.
The GitHub profile does not show my commits.
I have figured it out and posted my solution below.
I figured out out. I need to make sure the Gihub registered email is same as my local config email. so just set
git config --global user.email "myemail#xxx.com"
That's it.
Details:
https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
Commits(for new or old branch) done after changing the username and email are linked to me while Pushes(for both old and new branch) are for old user.
Moreover if I setup a new project or anything new as generating ssh keys I get the message in terminal as previous user. How do I remove that previous user from my system so that everything done related to github from my system should be related to my account.
I changed the config file through this link , it is also showing the correct username and email
through git config --global user.name or git config --global user.email.
https://help.github.com/articles/setting-your-email-in-git/
Check in the console as
git config --list
It will list all your git configuration status.
then try
git config --global --unset-all user.name
and then
git config --global --add user.name <your_username>
You can try from this link also. See the 1st Answer
Hope it might work !!!
When I push commits to github repo from windows github client, I can see my github username and link to my profile in history, like this:
initial commit [username]
But when I push changes from SourceTree, in commits history it looks like:
initial commit [mac_username]
I want my history on github.com looks like the first example (with github username and link to the profile) What settings I should enable in SourceTree to get it?
Check the config in those repos:
git config user.name
git config user.email
Make sure the repo on Mac has the same settings than the one on Windows.
This thread details how to change those settings in SourceTree, but check if "Allow SourceTree to modify your global Git configuration file" is set: that means it would apply to all your local git repo (Github or not).
The "Full name" is a bit misleading, in that you should use your GitHub login name (and GitHub account email), in order to generate the right commit author history on GitHub.
Go to preferences and on General tab you can see two text fields, one for Full Name and other for email, set the name whatever you want to appear
I just helped a friend to set up a Github account to collaborate on my project. His commits come through, but for some reason on the "Source" page of my repository next to his commit is only his name and not his username (with a link).
It seems strange, since Github obviously recognizes him (I added him to the list of collaborators etc.
Seems like a stupid question, but Google couldn't help.
Thanks!
Does your friend have the e-mail address he is using for his commits correctly set up as an alias in GitHub? Otherwise, how is GitHub to know who he is? Git itself only records the full name and the e-mail address and obviously not the GitHub username, since you can use Git perfectly fine without GitHub.
Run this in Terminal:
git config --global user.name "your-github-username"
git config --global user.email "your-github-email"
Add the email used in the git commits to github via Account Settings: Email Settings
Just ask your friend to add email that he use in local git commits to his GitHub account emails list as stated in GitHub Help
you can check the GitHub article:
$ git config --global user.name "example"
$ git config --global user.email "email#example.com"