I`m looking for best answer to following issue:
When I create new branch I have to always remove folder public/assets/(Ruby on Rails, we precompile assets only before deploying to production) so this gives me in git status about 500 lines like here:
...
# deleted: public/assets/tinymce/tiny_mce_src.js
# deleted: public/assets/tinymce/utils/editable_selects.js
# deleted: public/assets/tinymce/utils/form_utils.js
# deleted: public/assets/tinymce/utils/mctabs.js
# deleted: public/assets/tinymce/utils/validate.js
...
So my vim-fugitive start being useless with this mess. I would like to hide this lines from git status but this files should be actually removed.
I dont want to commit that because I dont want to push this deleted files to remote repo.
Actually you should NOT be having those assets in your Git in the first places.
If you are using a deployment solution like Capistrano you can precompile the assets during deployment on the remote machine, saving you the hassle of having them in the Git repository.
To enable asset compilation during a deployment with capistrano you simply have to add the following to your capfile (deploy.rb):
Now whenever you deploy to your server capistrano will do the compilation on the server during deployment.
You can then simply remove the
public/assetsdirectory from your git and add them to.gitignoreSorry to not answer your question directly, but what you are asking for is a remedy for the symptoms not addressing the cause.
Unless of course you have a good reason why you have the assets in Git, if so please specify why and we may be able to find a better solution.