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

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

    From the Git Manual:

    Using git-checkout-index to "export an entire tree"

    The prefix ability basically makes it trivial to use git-checkout-index as an "export as tree" function. Just read the desired tree into the index, and do:

    $ git checkout-index --prefix=git-export-dir/ -a

提交回复
热议问题