Nicer to do this and have a formatted file to commit on git than commit a non-formatted file and realise after a push.