bit-bucket - 下载特定提交的文件
bit-bucket - download file for specific commit
我可以通过 git clone 命令获取项目,但是有什么方法可以获取我之前特定提交的文件,或者可以拉取我之前特定提交的文件。
请给我建议!
https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/raw/{revision}/{path}
例如(jespern/django-piston/raw/tip/piston/utils.py
):
curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/tip/piston/utils.py
如果你想要一个不同的{revision}
,比如
one from the 0.2.2-maint
branch:
curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/0.2.2-maint/piston/utils.py
one from a specific commit fde50de72c4b:
curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/fde50de72c4b/piston/utils.py
我可以通过 git clone 命令获取项目,但是有什么方法可以获取我之前特定提交的文件,或者可以拉取我之前特定提交的文件。 请给我建议!
https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/raw/{revision}/{path}
例如(jespern/django-piston/raw/tip/piston/utils.py
):
curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/tip/piston/utils.py
如果你想要一个不同的{revision}
,比如
one from the
0.2.2-maint
branch:curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/0.2.2-maint/piston/utils.py
one from a specific commit fde50de72c4b:
curl https://api.bitbucket.org/1.0/repositories/jespern/django-piston/raw/fde50de72c4b/piston/utils.py