Can I use my work (Gitlab) commits to show up on my public (personal) GitHub account

Viewed 1683

I would like to understand better how many people today commit into 'private' repositories and yet their streak shows up on their public GitHub contribution page.

enter image description here

  1. Does that mean they have linked GitHub organization accounts and whatever commits they do (work-related) show up on their GitHub personal public page as well?

    • In this case does that mean they have somehow "allowed" for their personal email address to commit in private repos? Is this correct, allowed and considered a best practice?
  2. Or, could this also mean they have private (personal) GitHub private repositories as well?

I would like to know if I can do the same with my personal GitHub account and work related (Gitlab) account? Would I be able to do work-related stuff on the private Gitlab repos and still be able to earn streaks on my public Github account?

Any advice, tips would be greatly appreciated. Many thanks.

2 Answers

does that mean they have somehow "allowed" for their personal email address to commit in private repos?

I'm sure they just add their work email address to their account so Github counts commits made with both kind of addresses.

can I do the same with my personal GitHub account and work related (Gitlab) account? Would I be able to do work-related stuff on the private Gitlab repos and still be able to earn streaks on my public Github account?

That certainly no. Github surely will not count commit pushed to any other hosting. If you want Github to count your commits — push them to Github. Create private repositories if you need to hide your commits.

Does that mean they have linked GitHub organization accounts and whatever commits they do (work-related) show up on their GitHub personal public page as well?

You can do that by Setting your commit email address

can I do the same with my personal GitHub account and work related (Gitlab) account? Would I be able to do work-related stuff on the private Gitlab repos and still be able to earn streaks on my public Github account?

Yes You can do by coping all your Gitlab commits to a Github private repo, check this tool: https://github.com/alexandear/import-gitlab-commits

Related