Next, go to https://education.github.com/ and apply for the education pack (this allows you to have features you usually have to pay for). Don't be tempted by all the services/deals they offer you at this point.
Open Github desktop and log in (you may need to go to Preferences->Accounts)
Add a repository for the class
Name it csc470-fall2020 (everything is case sensitive, so when I put something in quotes, type it EXACTLY like that)
Make sure the repository is marked as "public"
Select "Unity" for Git Ignore
For Local Path put it wherever you like to keep your class files on your computer
Check "Initialize this repository with a README"
Click "Create Repository"
Commit your changes to the repository "locally" by typing a brief summary of what you did in the Summary field (e.g. "Created the repository for csc470") and click "Commit to master" (this should be on the bottom left of the window).
On the top/middle region of the screen, click "Publish repository"
Go to github.com/YOUR_USER_NAME/csc470-fall2020 and check to see that there is something there!
Turning on static hosting so your games can be played online
In you the csc470-fall2020 repository (on the github ***webpage***), go to settings, scroll down to "GitHub Pages" and under "Source" select the master branch.
Setting up your class replository for Github
In you the csc470-fall2020 folder on your computer, create a folder called "exercises" (all lower case)
Store all of your Unity projects in the "exercises" folder
Modifying your .gitignore file
On your computer, open up the .gitignore file in a plain text editor
Delete the lines that say (probably lines 4 and 5):
[Bb]uild/
[Bb]uilds/
Also, at the bottom of the file delete the lines that say:
# Builds
*.apk
*.unitypackage
Finally, remove the first character (the '/') in front of: /[Ll]ibrary/, /[Tt]emp/, /[Oo]bj/, /[Ll]ogs/, and /[Mm]emoryCaptures/
Save the file
Finally, open Github Desktop top and commit your changes. Then, you may need to commit changes one more time. (or just push your changes to github however you know how)
Preparing your Unity projects for Github
NOTE: You'll need to do this for all of your projects
With your project open in the Unity editor:
Open the editor settings window. (Edit > Project Settings > Version Control)
Make .meta files visible to avoid broken object references.
Version Control / Mode: “Visible Meta Files”
Use plain text serialization to avoid unresolvable merge conflicts.
Asset Serialization / Mode: “Force Text”
Disable compression for your builds: First, go to Edit > Build Settings, select WebGL, and then click "Switch Platform". Then go to Edit > Project Settings, click on Player in the left of the window. Then, under Publishing Settings, Change the Compression Format to "Disabled".
Note, we only need to do this because of recent Unity changes and this is a workaround to enable you to post your games online easily.