removes useless commits from file