Git: Checkout only files without repository?

前端 未结 6 1497
故里飘歌
故里飘歌 2020-12-13 04:31

i\'d like to just checkout the files without the .git files and the whole repository. It\'s because i\'d like to manage a website (php & html) with git and i\'m looking

6条回答
  •  -上瘾入骨i
    2020-12-13 04:39

    You could create a tar archive in a git working directory and copy the tar to the server:

    git archive -o foo.tar HEAD
    scp foo.tar server:
    

提交回复
热议问题