tôi tạo ra các bản sao lưu của kho git của tôi như thế nào trong How to backup a local Git repository? đề xuất vớikhôi phục kho git từ bó backup
git bundle create /tmp/foo-all --all
tôi có thể xem tất cả refs đang chờ ở đó, trong đó có một ref từ xa tạo ra bởi git-svn. Bây giờ tôi không thể tìm ra cách khôi phục lại gói này cho một kho lưu trữ cục bộ nữa. Tôi khá chắc chắn rằng tôi đã thực hiện nó một lần. Tôi đã thử git-clone nhưng điều đó mang lại cho tôi một kho lưu trữ chỉ với gói sao lưu của tôi như repo từ xa.
Tôi cũng đã cố gắng
git init
git bundle unbundle /tmp/foo --all
nhưng điều này chỉ liệt kê tất cả tài liệu tham khảo ...
Thẩm bó cho:
$ git bundle verify $somewhere/foo.bundle
The bundle contains 12 refs
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/master
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/heads/xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx refs/remotes/git-svn
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HEAD
The bundle requires these 0 ref
$somewhere/foo.bundle is okay
kiểm định không hiển thị với refs thiếu. – user1283719
@ user1283719 'git clone foo.bundle'? –
'git clone foo.bundle' tạo một kho lưu trữ mới với gói sao lưu của tôi làm kho lưu trữ từ xa như đã nêu ở trên. Kho lưu trữ cục bộ của tôi không thể sửa chữa được, vì vậy tôi muốn khôi phục nó từ bản sao lưu bao gồm khả năng sử dụng git-svn trên nhánh từ xa của nó. – user1283719