
1 0o0O0o0O0o 2024 年 8 月 18 日 /t/1050159 这个方案我用了两个月了,我很满意,很适合协作少的场景 |
2 Rache1 2024 年 8 月 18 日 |
3 sagaxu 2024 年 8 月 18 日 打包.git 目录是 OK 的,还有其它方式也可以 只备份 heads,tags,remote heads ,不包含未 commit 的 change ,也不包含 stash git bundle create /tmp/foo --all //备份 git clone /tmp/foo repo //还原 或者 clone 一份到别的目录,然后再打包整个目录 git clone --mirror xxx/repogit |
4 mikewang 2024 年 8 月 18 日 备份 .git 目录是可以的,不过之前可以先缩减一下大小。比较激进的做法是: git reflog expire --all --expire=now git gc --prune=now --aggressive 可以大幅缩小 .git 的占用空间 |
5 zhady009 2024 年 8 月 18 日 主机 1 上 git bundle create myproject.bundle --all 会输出一个 myproject.bundle 的文件,然后用 U 盘或者其他方式传输到主机上 2 执行 git clone myproject.bundle 或者 git pull myproject.bundle 同步 |