How to make changes to and commit a file