Skip to content

Instantly share code, notes, and snippets.

@dhbalaji
Last active October 14, 2021 07:31
Show Gist options
  • Save dhbalaji/2f11c4bcd58edff1d83b01d1710275e8 to your computer and use it in GitHub Desktop.
Save dhbalaji/2f11c4bcd58edff1d83b01d1710275e8 to your computer and use it in GitHub Desktop.

My commits were not listed in github but why

I did a few commits to Github but the username and email were not the same as mentioned in github. Due to it wont show up in the streak graph in Github.

Solution here https://stackoverflow.com/questions/8801729/is-it-possible-to-have-different-git-configuration-for-different-projects

Once you clone a repo, run

git config user.name git config user.email

If you see the expected results, then continue with the development else you need to set the right values at repo level

git config user.name="" git config user.email="

to set it globally use --global flag.

You can use aliases to avoid manually typing the command but adding the below lines to global gitignore. Once you checkout the repo, run git and you can verify git config user.name

[alias]
	dh-email = config user.email \"pes***@gmail.com\"
	dh-name = config user.name \"dhbalaji\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment