Git Clone: Just the files, please?

后端 未结 8 651
北海茫月
北海茫月 2021-01-30 00:25

I want to clone a GIT repo and NOT end up with a .git directory. In other words I just want the files. Is there a way to do this?

git clone --no-chec

8条回答
  •  隐瞒了意图╮
    2021-01-30 00:59

    you can create a shallow clone to only get the last few revisions:

     git clone --depth 1 git://url
    

    then either simply delete the .git directory or use git archive to export your tree.

提交回复
热议问题