This is nothing github specific. It will work with any git repository. Author is just a text attached to commit. Anybody can set it to anything.
You don't even need to edit ~/.gitconfig file. Just set GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL / GIT_AUTHOR_DATE env variables to anything you want. See https://git-scm.com/book/en/v2/Git-Internals-Environment-Var... for more variables.