Information Technology Reference
In-Depth Information
$ git tag -a v0.1.2 -m "Release 0.1.2"
$ git tag -a v2.8.4 -m "Release 2.8.4"
$ git tag -a v5.15.89 -m "Release 5.15.89"
If you want to get a zipped file with a specific version all you have to do is to ex-
ecute a command, such as:
$ git archive --format=zip --output=project-v0.1.2.zip
v0.1.2
$ git archive --format=zip --output=project-v2.8.4.zip
v2.8.4
$ git archive --format=zip --output=project-v5.15.89.zip
v5.15.89
All the versions are stored in the same repository and can be produced on demand
with the $ git archive command. There is no need to back up files such as
project-v2.8.4.zip . If you back up your repository you will always be able to
generate all of the specific versions that were tagged.
Gitattribute file allows you to exclude some files from the automatically generated
archive. When the .gitattributes file contains the following rule:
/Tests/ export-ignore
then the generated archive will contain all the files except those stored within
/Tests/ directory.
Summary
The first command introduced in this chapter, $ git diff , will help you check the
state of your project. It reports the changes using the format defined by GNU diffutils
tools. By default, when called without parameters:
$ git diff
compares the working directory to the staging area. Using the --staged parameter
you can compare the staging area to HEAD :
Search WWH ::




Custom Search