Committing changes before replacing some files