Details may depend on what scenario are you referring to (either this is web/mobile/desktop app or library or whatever). But the general approach is to not keep autogenerated stuff in your repository.
Instead you should consider providing a set of scripts/tools that will allow developers to "unwrap" working environment from clean hand-written sources.
If you want to deliver artifacts of your work to customers by doing git push
you may consider using a CI tool where you will script all actions needed to produce deliverable item from sources.
In a simplest approach (if for any reason CI system is not applicable) you can script deployment action in post-receive
hook on remote side.
A few references:
githooks manpage
Setting up Push-to-Deploy with git
Should I store generated code in source control
Update
If you chose this way you should think on approach that will allow you to reproduce exact environment from any version in the past. This mostly applies to dependencies - in case of ruby you should commit Gemfile.lock
to your repo, in case of node - you should use npm shrinkwrap
or similar tool to make sure that you can reproduce exactly the same environment that was used to deliver previous (that could have been released over a year ago and since then you have dozen new versions or your dependencies) version of your app/site or whatever to allow debugging.
Good practice here is to use tags in Git and embed information into deliverable that will allow you to find exact commit that was used to produce it.