Config Emails!
Opened this issue · 4 comments
You may want to mention in the readme that if you do not use the same email for both accounts, that they will need to check their global .gitconfig and/or set up a local .gitconfig to ensure that the user.email setting matches the account they want to have credit for the commits. The user.email flag is used to identify the 'user' that made the commit, regardless of what key was used to upload the history.
If you look at the code this script never actually touches any of the commits and doesn’t have access to any vulnerable information. It only works with publicly available html of GitHub contribution graphs 😄
If this is regarding a concern that anyone could imitate commits from any public GitHub account, here’s my Twitter response 😊 https://twitter.com/kefimochi/status/1470467623800377346?s=21
I did take a look at the code trying to fix my own issues, it's very nice!
I have two git accounts that are linked to different emails, a work and a personal. My default .gitconfig (global) setting for user.email is my work email. To make the commit sync work, I needed to change the local user.email .gitconfig setting on the repository to be my personal email. If I didn't do this, when trying to sync the contributions the default 'work' account was the one that GitHub thinks is making the commits! I did figure out why my 'work' account was making commits on my 'personal' repo, but it might help to add a note about this to the README for anyone else who comes across this issue. It just requires changing the user.email setting locally to ensure your personal account gets credit!
Ohh I get it now! I am too afraid to do personal development on work machine in case company can claim ownership so never ran into this problem. Will figure out how to help, thanks for bringing it up! 👏