Git archive of repository with uncommitted changes

前端 未结 9 709
旧时难觅i
旧时难觅i 2021-02-01 18:31

How can I create an archive of the current repository including local uncommitted changes using git archive?

9条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 19:06

    This creates a zip archive containing all working tree files except those that are ignored by git:

    git ls-files --others --exclude-standard --cached  | zip --names-stdin archive.zip
    

提交回复
热议问题