Boas Enkler Boas Enkler - 1 year ago 99
Git Question

Cloning / Reading only history /log of a git repository

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) ?

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

Thanks in advance

Answer Source

Clone the repository with the --bare flag:

git clone --bare ...

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download