Cloning / Reading only history /log of a git repository

后端 未结 1 1798
北荒
北荒 2020-12-30 05:35

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, no

1条回答
  •  伪装坚强ぢ
    2020-12-30 06:02

    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.

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

    0 讨论(0)
提交回复
热议问题