Is it OK to update code on repository after publication? Journals consider that is good practice to release script and codes to repeat the published results, and many of us I think agree with this practice. Code are typically deposited in software version control repositories (e.g., GitHub or BitBucket). 

I wonder if updating the codes during reviewing process or after publications (which in my opinion is quite important, in general) remains a good practice.
Maybe the obvious answer is yes, but for example it is certainly not good to modify the data deposited for a published article (or modify its pre-print in a pre-print server).
Absolutely yes!  There is no reason to stop a project from evolving just because you've published about it.

What would be good to do, however, is to identify the version current at the time of publication with a release version or other similar sort of tag. You can point to the specific tag in the publication and also have the repository tag point to the publication through its associated comment text.

This will allow a reader to have the best of both worlds: access to both the most updated information and also to the precise version associated with the publication if they need it.