0

When I run this command, the files of my latest commit are saved to a ZIP.

git archive -o ../code_version0.9.zip HEAD 

However the files in node_modules and build/ are missing.

That Is because my .gitignore is the following one:

node_modules
build/

How can I ignore files, but Include them In the archive? I looked into the documentation for .gitattributes but I couldn't find a include statement.

4

1 回答 1

0

据我所知,git archive只归档git 跟踪的文件,.gitignore忽略未跟踪的文件。git archive因此,您将永远无法管理.gitignore. 或者我错过了什么?

于 2015-06-18T19:49:49.237 回答