Say I push to a public repository an original file that I cover under a specific license. I later (or even immediately) find out that this license is incompatible with other licenses in the project. (Say one is the GNU GPL and the other is something incompatible with it.) I would like to know how I should responsibly and professionally handle mistakes like these.
If this mistake simply means that this particular project snapshot is technically against license for other people to build, then I imagine the responsible thing to do is push a new version of the file to add a second, compatible license or altogether replace the first license with a compatible one.
On the other hand, if it's against license to be distributing this snapshot even in source form (and having them in the repository history is, technically, "distributing"), I imagine I should additionally attempt (or ask the repository owner, when it's not me) to clear that particular commit from history.
Which of the above is closer to the truth? And are the implications/actions that I'm describing in each case correct?