Have you ever noticed an issue during push commit operation to Github? If you are using Github for your personal and professional work related accounts then there are more chances that you see different commit email IDs
associated with your push and commit.
Sometimes you should see message like this:
Why are my commits linked to the wrong user?
Well, as a standard practice and process by Github, it uses email address which is provided in the commit header
. If in your .gitconfig
file you have different email address associated and you want to check in using another email ID then there will be a conflict.
In this case, Github always uses the value specified in .gitconfig
file. Take a look at this .gitconfig file under user’s root directory. In my case on Macbook pro it’s under ~/.gitconfig
file location.
It contains below data:
[user] name = App Shah email = axxxxxx@crunchify.com [pull] rebase = false
If you see below message then most probably you need to change name and email values in that file.
Unrecognized author. If this is you, make sure <email>@crunchify.com is associated with your account. You can add emails in your account settings.
Yesterday I faced the same issue and by changing value in .gitconfig fixed my issue. In my case I was using Mac tool SmartGit
.
There are some other ways to fix this issue if you are performing push, commit operation using command line.
- On Macbook Pro, open Terminal Application.
- Make sure
git
is installed on Mac.- You could verify it by typing git in command line:
bash-3.2$ git
- You could verify it by typing git in command line:
- Configure Global email address for git using below command
git config --global user.email "axxxxx@crunchify.com"