如何告诉cookiecutter下载cookiecutter-django的稳定版本?

时间:2016-03-24 18:00:04

标签: python django cookiecutter cookiecutter-django

命令:

cookiecutter https://github.com/pydanny/cookiecutter-django/

将克隆最新版本的cookiecutter-django,其目标是Django 1.9。

Stable section in the README指向某些标签。其中一个是https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7

但如果我尝试:

cookiecutter https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7

我收到错误:

subprocess.CalledProcessError: Command '[u'git', u'clone', u'https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7']' returned non-zero exit status 128

那么,如何指定cookiecutter使用那些稳定发布而不是master分支?

1 个答案:

答案 0 :(得分:8)

根据cookiecutter docs,您可以选择使用CLI参数--checkout-c

签出特定分支,标签和提交

像这样的命令应该有效:

$ cookiecutter https://github.com/pydanny/cookiecutter-django.git --checkout 1.8.7