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

后端 未结 30 2937
暖寄归人
暖寄归人 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:56

    I've written a simple wrapper around git-checkout-index that you can use like this:

    git export ~/the/destination/dir
    

    If the destination directory already exists, you'll need to add -f or --force.

    Installation is simple; just drop the script somewhere in your PATH, and make sure it's executable.

    The github repository for git-export

提交回复
热议问题