Commit changes before checkout