克隆/只读取git存储库的历史/日志 [英] Cloning / Reading only history /log of a git repository

查看:141
本文介绍了克隆/只读取git存储库的历史/日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在locale克隆的git仓库中,我可以用

Within a localy cloned git repository i can watch the history with

git log

在一个小工具中,我只需要存储库的历史记录,而不是代码。
有没有克隆版本库的方法(仅限历史版本)?

In a small tool i do only need the history of a repository, not the code. Is there a way to clone a repository without the code (history only) ?

是否有其他方法可以从git存储库获取历史记录。

Is there any other way to get the history only from a git repository.

预先感谢

推荐答案

使用 - 裸标记:

git clone --bare ...




Git中的裸存储库 只包含版本控制
信息
,没有工作文件(没有树),它不包含
特殊的.git子目录。而是直接在主目录中包含
.git子目录的所有内容。

A "bare" repository in Git just contains the version control information and no working files (no tree) and it doesn't contain the special .git sub-directory. Instead, it contains all the contents of the .git sub-directory directly in the main directory itself.

了解更多请参阅文档或此帮助页面关于设置服务器环境使用该选项。

Read more in the documentation on it, or this helpfull page about setting up server environments using the option.

这篇关于克隆/只读取git存储库的历史/日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆