ทำมิเรอร์ที่เก็บ
สร้างโคลนเปล่าของที่เก็บ
git clone --bare https://github.com/exampleuser/old-repository.git
Mirror-push ไปยังที่เก็บใหม่
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
ลบที่เก็บโลคัลชั่วคราวที่คุณสร้างในขั้นตอน 1
cd ..
rm -rf old-repository.git
ทำมิเรอร์ที่เก็บที่มีวัตถุ Git Large File Storage
สร้างโคลนเปล่าของที่เก็บ แทนที่ชื่อผู้ใช้ตัวอย่างด้วยชื่อของบุคคลหรือองค์กรที่เป็นเจ้าของที่เก็บและแทนที่ชื่อที่เก็บตัวอย่างด้วยชื่อของที่เก็บที่คุณต้องการทำซ้ำ
git clone --bare https://github.com/exampleuser/old-repository.git
นำทางไปยังที่เก็บที่คุณเพิ่งโคลน
cd old-repository.git
ดึงวัตถุ Git Large File Storage ของที่เก็บ
git lfs fetch --all
Mirror-push ไปยังที่เก็บใหม่
git push --mirror https://github.com/exampleuser/new-repository.git
ผลักดันวัตถุ Git Large File Storage ของที่เก็บไปยังมิเรอร์ของคุณ
git lfs push --all https://github.com/exampleuser/new-repository.git
ลบที่เก็บโลคัลชั่วคราวที่คุณสร้างในขั้นตอน 1
cd ..
rm -rf old-repository.git
คำแนะนำข้างต้นมาจากความช่วยเหลือของ Github: https://help.github.com/articles/duplicating-a-repository/