What if you just removed public/assets from the master branch. Then do like you mentioned: create a heroku branch, pre-compile assets on that branch, commit those files to that branch, then push that branch to heroku master. Then you wouldn’t need to mess with the .gitignore and it should work seamlessly to merge changes from master into the heroku branch. Or am I missing something?, because I’m trying to do the same thing.