如题,比如某个版本我打了 1.0 的 tag,我想导出 1.0 所有的文件,如何操作?
学习是最好的投资!
If your tag name is 1.0, you can export it as follows.
1.0
1. Export and compress to zip format:
zip
$ git archive --format=zip --output=v1.0.zip 1.0
2. Export and compress to tar.bz2 format:
tar.bz2
$ git archive 1.0 | bzip2 > v1.0.tar.bz2
3. Export and compress to tar.gz format:
tar.gz
$ git archive --format=tar 1.0 | gzip > v1.0.tar.gz
View existing tagsgit tag -l
git tag -l
Switch to a certain taggit checkout tag_name
git checkout tag_name
If your tag name is
1.0
, you can export it as follows.1. Export and compress to
zip
format:2. Export and compress to
tar.bz2
format:3. Export and compress to
tar.gz
format:View existing tags
git tag -l
Switch to a certain tag
git checkout tag_name