How to create repository mirror onto github

Recently we wanted to create a yocto cgit repository mirror onto our github which should track our changes as well as yocto git,  follow below steps to create a mirror on github,

This assumes, we are cloning into poky-mirror directory on our local machine ~/Desktop/devlab/yocto and we have create a new repository named “poky” into our github account.

 cd ~/Desktop/devlab/yocto
git clone --mirror git:// poky-mirror
cd poky-mirror/
git remote set-url --push origin
git push --mirror

With this, you should see a git like onto your github . Replace URLs as per your need.

Reference : github help


Follow Lynxbee

Leave a Reply / Ask Question