Git. How to create archive with files, that have been changed?

后端 未结 3 588
后悔当初
后悔当初 2021-01-06 17:21

Keeping the file structure, like git-archive

3条回答
  •  隐瞒了意图╮
    2021-01-06 18:06

    Here is command to archive changes between commit tagged release and HEAD, also works with filenames that includes spaces, quotes, double quotes, any special characters:

    git diff --name-only -z --diff-filter=ACMRT release..HEAD | xargs -0 git archive -o update.tar.gz HEAD --
    

提交回复
热议问题