Workflows and Custom scripts

How do i make workflows, custom scripts and customizations on doctypes portable? i.e whenever i make changes to the development server, to be able to push the changes to the production environment without copy pasting the code.

I noted that those changes do not reflect when you push them to github.

These changes are stored in the database, so you will need to take a backup and restore them at your new site.

More info: