Clone git repository without history?

后端 未结 3 1533
你的背包
你的背包 2020-12-29 01:32

I wanted clone repository from github. It had lot of history, So i wanted clone without any history.

Is it possible to clone git repository without history?

3条回答
  •  無奈伤痛
    2020-12-29 02:33

    After cloned, you can delete the .git directory, then re-init the git to generate a totally new repo.

    $ git clone ...
    $ cd path/to/repo
    $ rm -rf .git
    $ git init
    

提交回复
热议问题