Do a “git export” (like “svn export”)?

后端 未结 30 2882
暖寄归人
暖寄归人 2020-11-21 22:33

I\'ve been wondering whether there is a good \"git export\" solution that creates a copy of a tree without the .git repository directory. There are at least thr

30条回答
  •  醉话见心
    2020-11-21 22:58

    I just want to point out that in the case that you are

    1. exporting a sub folder of the repository (that's how I used to use SVN export feature)
    2. are OK with copying everything from that folder to the deployment destination
    3. and since you already have a copy of the entire repository in place.

    Then you can just use cp foo [destination] instead of the mentioned git-archive master foo | -x -C [destination].

提交回复
热议问题