root/
.git
deploy/
Site/
blah/
more_blah/
something.local
else.development
Rakefile
.gitattributes
编辑:为了进一步澄清上述内容,目录名称末尾有一个/
,子目录缩进在目录下方,因此blah
和more_blah
是目录,而Rakefile
和.gitattributes
是文件,但这四个都是Site
的子元素。
我正在Site
目录中运行git-archive
命令,如下所示:
git archive --format=tar --prefix=git-v0.0.1/ v0.0.1 | gzip > ../deploy/git-v0.0.1.tar.zip
但是不管我在 .gitattributes 文件中放什么样的模式,最终生成的归档文件总是包含 Rakefile 文件。我已经尝试过以下方式:
- Rakefile
- Site/Rakefile
- */Rakefile
- ./Rakefile
- Rakefile*
- *
抱歉我没有表达清楚。
- 我说我使用的“模式”似乎不起作用,但我在模式后面使用了 "export-ignore"。
Rakefile
不是目录,只是一个文件。.gitattributes 文件成功从归档中移除了其他模式,这不是真的,由于我已经重命名了某些文件但没有将提交与重命名一起存档,因此我似乎得到了一些良好的结果。我的错!:SRakefile
不是唯一使用的模式,但是它是唯一一个不起作用的模式。无论我是单独使用还是与其他模式一起使用,都不起作用,并且放在文件中的任何位置都不行。
Rakefile export-ignore
*.local export-ignore
*.development export-ignore
*.staging export-ignore
.gitattributes
文件是什么样子的? - Paŭlo Ebermann