Exact `svn export` equivalent command for git?

前端 未结 8 849
花落未央
花落未央 2021-02-06 04:53

There is no exact svn export equivalent command for git? Really?

Beware: this is not a duplicate question. That is, I already know and have

8条回答
  •  被撕碎了的回忆
    2021-02-06 05:36

    Re your point, git archive <- This would be the perfect solution ...but it only has 2 possible formats: tar or zip, you can add new formats using documentation from the EXAMPLES section of the git-archive(1) man page:

       git config tar.tar.xz.command "xz -c"
           Configure a "tar.xz" format for making LZMA-compressed tarfiles.
           You can use it specifying --format=tar.xz, or by creating an output
           file like -o foo.tar.xz.
    

    While being "on windows" is generally considered an impediment to many tasks, with a little extra work, you can almost catch up to the folks running other operating systems by using software like Cygwin or MKS Toolkit.

    If after confirming that whatever command you need is available from within your shell, this sort of git config … command still doesn't work for you, then you should perhaps post additional details about your configuration in a question on SuperUser.com.

提交回复
热议问题