Question on hardcoded variables appearing in repo commit histories

If someone inadvertently pushes project files with hardcoded variables to a GitLab repo, is there any way to individually delete the affected files or is a full repo purge required?