Excluding files from being deployed with Capistrano
Capistranoでデプロイ時に特定のファイルをデプロイ対象から外す
.gitattributesファイルを作成
.gitattributes
.gitattributes export-ignore
.gitignore export-ignore
features export-ignore
spec export-ignore
自分の場合はrbenvの.rbenv-versionを除外した。
spec/とすると除外されないことがあった。specで除外された。
(Gitのバージョンなどで違うかもしれない)
参考: StackOverflow git archive : export-ignore, ignoring directories