Creates an archive from a git repository or directly from a project
Using at the root path of a local cloned repository. This will create a tar.gz tarball as /tmp/my_project.tar.gz :
git_archive('my_project')
Adding prefix in the archive so that a top directory will be extracted and all the files will remain inside it :
git_archive('my_project', prefix='MyProject/')
Using outside a cloned repository :
git_archive('my_project', project_path='/path/to/my_project')
Specify the tag to export. Default is the HEAD of master :
git_archive('my_project', tag="1.2")
Change the format. Now this will create a file /tmp/my_project.zip :
git_archive('my_project', format="zip")
Change the saving path. This will a create a file /home/django/my_project.zip :
git_archive('my_project', path='/home/django')
Using a remote repository :
git_archive('my_project',
remote="git@git.u-strasbg.fr:django-ldapuds.git")
Checks if a tag/branch exists in the repository
Collects branches names locally or from a remote repository
Collects tags names locally or from a remote repository