Adding a Unity project to a local Git repository, and pushing files up to GitHub
In the previous recipe, you created a new online project repository using the free GitHubServer, and then cloned (duplicate) a copy onto a local computer.
In this recipe, we will transfer a Unity project into the local project repository, and use the stored link from the cloning to push the changed files back up to the Guthub online Server.
Getting ready
This recipe follows on from the previous one, so ensure you've completed that receipe before beginning this one.
How to do it...
To add a Unity project to a Git repository, and push it up to GitHub, do the following:
- Create a new Unity project (or make use of an old one), save the Scene, and quit Unity. For example, we created a project named project-for-version-control that contains the default
SampleScene
and a Material namedm_red
. It is the asset files in the Project panel that are the files that are stored on disk, and are the ones you'll be version controlling...