第14章:数据的导入和导出
基础知识
tree导入导出:git archive
git archivedate -Ins
# 2020-12-27T22:03:27,794980462+00:00
(git ls-tree efd4)
# 100644 blob ce013625030ba8dba906f756967f9e9ca394464a name.ext
# 100755 blob ce013625030ba8dba906f756967f9e9ca394464a name2.ext
git archive --prefix=ar- -o ar.tar efd4^{tree} -- name2.ext
tar tvf ar.tar
# -rwxrwxr-x root/root 6 2020-12-27 22:03 ar-name2.ext(git show --format=fuller efd4)
# commit efd4f82f6151bd20b167794bc57c66bbf82ce7dd
# Author: b1f6c1c4 <b1f6c1c4@gmail.com>
# AuthorDate: Sun Sep 13 20:26:40 2020 +0800
# Commit: b1f6c1c4 <b1f6c1c4@gmail.com>
# CommitDate: Sun Sep 13 20:26:40 2020 +0800
#
# Message may be read
# from stdin
# or by the option '-m'
git archive --prefix=ar- -o ar-c.tar efd4 -- name2.ext
tar tvf ar-c.tar --full-time
# -rwxrwxr-x root/root 6 2020-09-13 12:26:40 ar-name2.ext
git get-tar-commit-id <ar.tar
git get-tar-commit-id <ar-c.tar
# efd4f82f6151bd20b167794bc57c66bbf82ce7dd任意对象导入导出
与其他版本控制软件交互操作
总结
最后更新于