I have recently created a small project and pushed it to GitHub. I now plan on applying an open-source license. Once I choose a license and commit it to the project, are the older versions subjected to that license?
Yes and no.
If you have previously released versions of your software to the public, you generally can't revoke any license you have already released it under (doing so would cause massive issues for anyone who has already made use of the software).
However, as the copyright owner, you retain the exclusive right to re-license (including dual licensing) any version of your software at any time (providing of course you are the sole copyright holder, or that you continue to comply with the licenses of any other software you include).
In your case I'm assuming you have not specified any particular license on your project thus far. That means that until now, the project is effectively 'all rights reserved'. Once you apply a license, it applies to the state of the project at the time of that commit. If someone comes along and forks your repository, then reverts to a previous commit, it is technically no longer licensed to them and they cannot use it in any meaningful fashion.
If you wanted to, you could of course just specify that 'any commit is covered by this license', or, you could even include for clarity that 'this license applies only from commit abc123 forward'.
This is a bit of a general answer to a general question, as I'm unclear on your exact intentions, but I'd be happy to clarify further if you want to add more specifics to your question.