Exclude specific files when pushing to a specific Git repository
git, github, heroku, ruby-on-rails
Solution
The easy way to solve your actual problem is to create a `.slugignore` file in the root of the repository that lists files that shouldn't be packaged in the slug.
- Heroku documentation on Slugignore
Problem
Is it possible to exclude specific files (*.ai, *.psd) when pushing to certain repositories with Git? My need comes from trying to use Git for both version control and deployment to Heroku. If I include my graphic assets in the deploy, the slug size is larger than desired. However, I do need to include all project files in my main github repository.