Git archive of repository with uncommitted changes

前端 未结 9 710
旧时难觅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 18:52

    Improving nevsan's answer for my purpose - to archive latest code in any case (committed or not):

    uploadStash=`git stash create`; git archive -o code_outgoing.zip ${uploadStash:-HEAD}
    

提交回复
热议问题