Answers.Body: <p>As far as I understood your question, you want two things:</p>
  
  <ol>
  <li><p>Providing a reference solution that is not visible to the students until the course is done.</p></li>
  <li><p>Having a way for your students to define a finished solution they can (probably only virtually) "hand in"<sup>1</sup></p></li>
  </ol>
  
  <h1>Providing a reference solution</h1>
  
  <p>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.</p>
  
  <p>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).</p>
  
  <h1>Defining a finished solution</h1>
  
  <p>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.</p>
  
  <p>To mark a state as finished, I would use branches. You could for example require your students to create a <code>solution</code> branch in their repository once they are done.</p>
  
  <h1>Having everything in one namespace (optional)</h1>
  
  <p>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.</p>
  
  <p>This would provide an easier overview for you over your students' repositories.</p>
  
  <hr>
  
  <p><sup>1</sup> 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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-11T15:04:12.447Z
Answers.Text: Thanks for the answer. This is getting there, but the starter and the solution are ideally in the same repo (as the latter is just the fully developed version of the former). I think the comment above from @ctrl-alt-delor is closer to what I should be doing
Answers.UserDisplayName: paulusm
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-10T11:33:28.513Z
Answers.LastActivityDate: 2017-12-10T11:33:28.513Z
Answers.UserDisplayName: TuringTux
Body: <p>I run web development coding workshops where  I give students a starting repo, then want to have a version for the final, finished "solution". Ideally students should not see the solution easily until I publicise it.</p>
  
  <p>I wondered if others have got a good workflow for this? I've tried tags and branches, but not found something I'm really happy or confident with yet.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T14:59:18.113Z
Comments.Text: @ctrl-alt-delor yes, this is close to what I need I think. Why the "if you are going to do this?" comment though?
Comments.UserDisplayName: paulusm
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T15:00:04.483Z
Comments.Text: @Buffy this is about Computer Science Education isn't it?
Comments.UserDisplayName: paulusm
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T15:16:23.420Z
Comments.Text: I think it is a bit marginal, but other don't seem to agree so it is fine. You could explore it elsewhere, as well of course, and might get more/better answers. But in general, just because something is _used_ in education doesn't necessarily make questions about it relevant here.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-20T14:19:48.050Z
Comments.Text: I don't understand the problem. You could either post the solution at the end OR post it to a different repository and only reveal its location at the end.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-20T14:22:07.520Z
Comments.Text: Also, this is more of a Stack Overflow type of question as it is asking for technical solutions, not educational ones.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-20T14:28:59.520Z
Comments.Text: Don't there is more than one way to code a solution. I was just reading “mind storms” — Seymour Papert, in it there is a bit where he talks about a lesson in which he was observing, the pupils got stuck, and the teacher directed the pupils to a word document, where they could copy the correct code from. At the end of the lesson all pupils had working code. No pupil learnt anything.
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-20T14:46:33.870Z
Comments.Text: Publishing a reference solution after the exercise ends is common practice. Just don't assume it is the only solution. Back in the olden days these were posted on paper outside the prof's office. It often generated a lot of forehead-smacking, of course.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-20T15:23:41.640Z
Comments.Text: If you are going to do this. Then two branchs in a private repo. Push 1st branch into public repo at start of term, then push 2nd branch (for the reveal) at the end. Pupils have to do a pull the start, and at the end, with a branch switch. Get a new puplic repo next year.
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-19T05:13:19.037Z
Comments.Text: This is not a matter for git so much as for an LMS. Eg https://docs.github.com/en/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom (may not be best link but only for the idea)
Comments.UserDisplayName: Rushi
Tags: <git>
Title: Best Git strategy for workshop code (starter -> end solution)
ThreadText: # Best Git strategy for workshop code (starter -> end solution)
  
  (Asked by: username_0 on 2017-11-20)
  
  I run web development coding workshops where I give students a starting repo, then want to have a version for the final, finished "solution". Ideally students should not see the solution easily until I publicise it.
  
  I wondered if others have got a good workflow for this? I've tried tags and branches, but not found something I'm really happy or confident with yet.
  
  **Tags:** git
  
  > **Comments:**
  > **username_1**: I don't understand the problem. You could either post the solution at the end OR post it to a different repository and only reveal its location at the end.  
  > **username_1**: Also, this is more of a Stack Overflow type of question as it is asking for technical solutions, not educational ones.  
  > **username_2**: Don't there is more than one way to code a solution. I was just reading “mind storms” — Seymour Papert, in it there is a bit where he talks about a lesson in which he was observing, the pupils got stuck, and the teacher directed the pupils to a word document, where they could copy the correct code from. At the end of the lesson all pupils had working code. No pupil learnt anything.  
  > **username_1**: Publishing a reference solution after the exercise ends is common practice. Just don't assume it is the only solution. Back in the olden days these were posted on paper outside the prof's office. It often generated a lot of forehead-smacking, of course.  
  > **username_2**: If you are going to do this. Then two branchs in a private repo. Push 1st branch into public repo at start of term, then push 2nd branch (for the reveal) at the end. Pupils have to do a pull the start, and at the end, with a branch switch. Get a new puplic repo next year.  
  > **username_0**: @username_2 yes, this is close to what I need I think. Why the "if you are going to do this?" comment though?  
  > **username_0**: @username_1 this is about Computer Science Education isn't it?  
  > **username_1**: I think it is a bit marginal, but other don't seem to agree so it is fine. You could explore it elsewhere, as well of course, and might get more/better answers. But in general, just because something is _used_ in education doesn't necessarily make questions about it relevant here.  
  > **username_3**: This is not a matter for git so much as for an LMS. Eg https://docs.github.com/en/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom (may not be best link but only for the idea)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2017-12-10. Score: 2
  
  As far as I understood your question, you want two things:
  
  1. Providing a reference solution that is not visible to the students until the course is done.
  2. 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.
  
  > **Comments:**
  > **username_0**: Thanks for the answer. This is getting there, but the starter and the solution are ideally in the same repo (as the latter is just the fully developed version of the former). I think the comment above from @username_2 is closer to what I should be doing  
  
  ---
  
  