As far as I understood your question, you want two things:
Providing a reference solution that is not visible to the students until the course is done.
Having a way for your students to define a finished solution they can (probably only virtually) "hand in"1
Providing a reference solution
To achieve this, I would just create a repository containing the reference solution when the course is done and share the link with your students.
If you have the ability to create private repositories, you could use this to check that only your students have access to the reference solution (and not also the students of the course you give next year).
Defining a finished solution
Each student has their own working repository. As it's necessary that all of them start with a given initial set of files, they could create their repository by forking a "starter pack" repository you provide. If this wasn't required, they could just create a new empty repository on their own.
To mark a state as finished, I would use branches. You could for example require your students to create a solution
branch in their repository once they are done.
Having everything in one namespace (optional)
Most Git hosters allow the creation of organizations or groups. If you want to, you could create one for each course you give. This organization would then contain the working repository of each student and the reference solution when the course is done.
This would provide an easier overview for you over your students' repositories.
1 After reading through your question another time, I guess I've misunderstood the question and you only asked for a solution for the first item in my list. I think I will nevertheless share my thoughts on both - maybe they can be helpful for you or any future visitor.