ฉันต้องการถ่ายโอน repo ทั้งหมดไปยังเครื่องใหม่ที่ไม่ใช่เครือข่ายซึ่งดีกว่าในรูปแบบไฟล์เดียว กำคอมไพล์ช่วยให้git fetch, git pullการดำเนินงานในรูปแบบของสภาพแวดล้อม sneakernet แต่ดูเหมือนจะสมมติว่าคุณมีรุ่นที่ทำงานของ repo บนเครื่องปลายทาง
การร้องขอที่ถูกต้องคืออะไร:
- Bundle ทุกสาขาใน repo ปัจจุบัน
- เริ่มต้น repo ใหม่บนไดเร็กทอรีปลายทางเช่นรับ root คอมมิตที่ติดตั้งอย่างถูกต้อง
ฉันได้ส่งแพตช์อัปสตรีมเพื่อชี้แจง:
`git clone` can use any bundle created without negative refspecs
(e.g., `new`, but not `old..new`).
If you want to match `git clone --mirror`, which would clone other
refs such as `refs/remotes/*`, use `--all`.
If you want to provide the same set of refs that a clone directly
from the source repository would get, use `--branches --tags` for
the `<git-rev-list-args>`.
ดังนั้น$ git bundle create repo.bundle --branches --tagsแมตช์ที่ดีที่สุดโคลน
$ git bundle create repo.bundle --all จะให้ภาพสะท้อนของเครื่องต้นทางของคุณรวมถึงการอ้างอิงระยะไกล
--allตัวเลือกไม่ได้อยู่ในหน้าคนของฉันสำหรับbundle(ฉันกำลังดูเวอร์ชัน 1.7.6.msysgit.0) และไม่ได้ใช้ไฟล์. bundle ในส่วน URL สำหรับclone. ทำให้ฉันมั่นใจมากขึ้นที่จะแนะนำการใช้งาน