search

Home  >  Q&A  >  body text

Git如何将打了某个Tag的文件全部导出?

如题,比如某个版本我打了 1.0 的 tag,我想导出 1.0 所有的文件,如何操作?

PHPzPHPz2801 days ago797

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-21 10:58:59

    If your tag name is 1.0, you can export it as follows.

    1. Export and compress to zip format:

    $ git archive --format=zip --output=v1.0.zip 1.0

    2. Export and compress to tar.bz2 format:

    $ git archive 1.0 | bzip2 > v1.0.tar.bz2

    3. Export and compress to tar.gz format:

    $ git archive --format=tar 1.0 | gzip > v1.0.tar.gz

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-21 10:58:59

    View existing tags
    git tag -l

    Switch to a certain tag
    git checkout tag_name

    reply
    0
  • Cancelreply