是否可以下载使用git归档在提交/修订中仅更改的文件 [英] Is it possible to download ONLY files changed in a commit/revision using git archive

查看:32
本文介绍了是否可以下载使用git归档在提交/修订中仅更改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用git archive commmand是否可以从存储库中下载特定提交ID的已更改/受影响的文件?是否可以使用Web界面@ bitbucket?

Using git archive commmand is it possible to download only the changed/affected files from a repository for a particular commit id ? Is it possible using the web interface @ bitbucket ?

推荐答案

列出使用git diff-tree提交所做的更改中的文件,并将它们传递给git archive的命令行.

List the files changed in a commit with git diff-tree and pass them to the command line of git archive.

git archive --format=zip --output=commit_files.zip <tree-ish> `git diff-tree --no-commit-id --name-only -r <tree-ish> | sed ':a;N;$!ba;s/\n/ /g'`

这篇关于是否可以下载使用git归档在提交/修订中仅更改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆