現象
Githubにcommit+pushしても、自分のアカウントとして認識してくれない。
Githubにログインして直接コミットしたら、ちゃんと認識してくれる。
pushできるってことは、アカウントを認識してるからじゃないの??って不思議になった。
対処方法
commitの詳細ページをみたら、どうやらcommit時のメールアドレスが知らないアドレスだよって言われてる。
つまり、commit時のメールアドレスでアカウントを判定しているようだ。
なので、解決方法としては、
commit時のメールアドレスをGithub側に登録してあげる
commit時のメールアドレスをGithubアカウントに設定済みのメールアドレスに変える
git config (--global) user.email="Githubに登録済みのアドレス"
のいずれかで解決する。
その他
気になった試したのだが、commit時のメールアドレスを他人のものにしてcommitすると、他人のcommitとして登録されてしまう。
Githubの問題というよりGit自体がそういう仕様なのだからしょうがないのだろうか。