sách gpt4 ăn đã đi

Kho lưu trữ Git không có lịch sử

In lại 作者:太空狗 更新时间:2023-10-29 14:38:05 27 4
mua khóa gpt4 giày nike

有没有可能没有历史的 Git 仓库?例如,我有一个我工作的本地 Git 存储库,我想将最新版本推送到生产服务器。生产服务器上不应存储任何历史记录。我该怎么做?

câu trả lời hay nhất

你可以看到命令 git archive 符合要求:

Creates an archive of the specified format containing the tree structure for the named tree, and writes it out to the standard output.
Nếu như is specified it is prepended to the filenames in the archive.

git archive behaves differently when given a tree ID versus when given a commit ID or tag ID.

  • In the first case the current time is used as the modification time of each file in the archive.
  • In the latter case the commit time as recorded in the referenced commit object is used instead.

创建存档后,您可以复制它并在服务器端解压缩:服务器上不需要 git。
由于您只需复制 一个 文件(而不是在您的工作树上使用 rsync 复制大量文件),因此传输更容易。

关于没有历史的 Git 仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27580782/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress