- Check out the branch for the lab you want to distribute
- Delete the history:
rm -rf .git
- Initialize the git repo:
git init
- Add all of the files:
git add .
- Make the commit:
git commit -m "Initial commit of template code"
- Add the template repo (e.g.,
git remote add origin git@github.com:jlpteaching/dinocpu
) - Push the code:
git push -f origin master
- Make changes in private repo to the labX branch. Note, you will probably want to make changes to the master branch then merge the labX branch.
- Copy all changes over to the template repo:
cp -ru dinoprivate/* .
- Commit the changes to the template repo:
git commit
. You probably should comment on the git changeset hash is from the private repo in the commit message. - Push the code:
git push -f origin master
Note: If you know of a better way to do this, I'm all ears.