Each commit in git history is a legally distinct entity, and is licensed according to the LICENSE file that existed at that point in history. As an author, you have the right to change the license of your project at any time.
So, if commit
X switches the project's license from no-license to MIT, then any user has the right to use the project from point
X forward under the MIT license; however, any commit older than
X still remains unlicensed and cannot be used.
This remains true even if you decide later on to close the project again, say in commit
Y. Then the code for commits
X .. Y-1 will remain MIT-licensed, but the code from commit
Y forward or before
X is closed-source.
Now, having a "bad" license in the past is not really problematic -- as long as people who clone the project know not to use those past commits in any way. Something like looking into blame history qualifies as fair use; on the other hand, copying blocks of code from past commits might be problematic.
If you want to avoid these issues altogether and apply the new license retroactively, you can: (a) rewrite git history, and place your license-changing commit at the beginning of time; or (b) provide a written note somewhere in README that you wish the new license to apply retroactively to past commits. Note that in all cases you cannot revoke any past license, you can only grant an additional one (which is probably what you want anyway), making your code dual-licensed in the past.