I have a local repository at my workstation and remote repository on server (phpfog.com). My application generates cache files and I want to delete them (on the remote) everytime someone pushes: is it possible and if so - how? FYI: These files are ignored using .gitignore (maybe there might be a way how to use this).
I've heard of git hooks but have little idea how to use them.
Thank you
Edit: I want to do git clean (remove untracked files) but on the remote and with every push. These files are generated by application and this cannot be solved by .gitignore-ing them (in fact they are gitignored).
I think post-receive hook is what you are looking for.
Just add a bash script to remote server which clean all cache file and specify it as post-receive hook. For more information look at http://book.git-scm.com/5_git_hooks.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With