Mutating state in a live program shouldn't be done carelessly (any more than a schema migration on a live database), but removing it completely from the toolbox is overly restrictive, especially since that also involves removing it from the toolbox while testing and developing.
The better way is tools like Iceberg and its various predecessors (Iceberg is nice because it works with git which has become the industry standard at this point for version control). There, you select down to the individual method what you want to commit and you can push it to other git repos on services like Github.