-1

I have a github repo that contains a page, a profile page about myself, but I have two github accounts. Is there any way I can manage the repo from my main account and have it sync to my secondary account?

Moreover, since my primary github will have the page at [primaryuser].github.io, is there any way to have the repo on the secondary user be called [secondaryuser].github.io? So I can manage two websites from one repo?

I'm assuming I'd make the secondary account a contributor to the page repo and then have a script or something that syncs that repo with another?

Is this even possible? I realize it is a little complicated.

AndrewSB
  • 951
  • 3
  • 11
  • 24

1 Answers1

0

If I understand you correctly, the easiest way (although not automated) to keep these two repos in sync is to fork the repo and create a remote. There's good information here on how to do that: Pull new updates from original GitHub repository into forked GitHub repository

However, if you want to automate it, I believe it's possible by using webhooks. I've never done it, but the general idea would be, you set up a server to listen to push events on your main repo, and then call a fetch and merge on the new repo (same process as above). Here's documentation on webhooks: https://developer.github.com/webhooks/creating/

Community
  • 1
  • 1
Vinnie Pepi
  • 166
  • 4