Fix unrecognized commits
  • 11 Nov 2019
  • 1 Minute To Read
  • Contributors
  • Share
  • Dark

Fix unrecognized commits

  • Share
  • Dark

When an author or committer’s email is not configured correctly, the commit is not associated with the correct user, and it is almost impossible to trace who is responsible for which piece of code.


To troubleshoot the root cause do the following:

Make sure the listed email address is your correct email address


➡️ If this email address is correct
➡️ If this email address is incorrect

A. Adding an email address to your GitHub account

  1. Follow the steps in this guide
  2. Re-run the policy


B. Updating your git configuration settings

  1. Open command line inside the git dir and type the following
$ git  config  --global

Is the listed email address in the terminal is correct?

No - This is not my correct email address

Set your username and email address:

$ git  config  --global
$ git  config  --global  "John Doe" 

Yes - This is my correct email address

You have a local git config file inside your repository dir which overwrites your global git config - fix it

  1. Rewrite your commit(s) history
  2. Push the changes to the remote branch - Datree automatically scans your changes.
Was This Article Helpful?