Using Unity with Version Control

Planning
Step 1
Learn to use Git and Unity!

We're going to learn the basic workflow of git, folder structure, and setup our Unity project to work with version control!

Github
Step 2
Click EDIT on your Unity project's toolbar
Unity1
Step 3
Go to PROJECT SETTINGS -> EDITOR
Unity2
Step 4
Structure your Unity project for version control

Set Version Control to VISIBLE META FILES
Set Asset Serialization to FORCE TEXT

Unity3
Step 5
Sign Up for a Github Account!

A github account is your portfolio as a developer!
Make sure to be serious when you make it!

Signup
Step 6
Make a New Repository

Give your new repo a name and maybe a description
MAKE SURE YOU SET THE GITIGNORE TO UNITY

Unity4
Step 7
Opening the terminal

Search for git bash and open it!

Lookup
Information
Step 8
Folder Structure and File Paths

My Unity Project is located on the Desktop!
So the path to it from my Home directory would be Desktop/NameOfMyProject

Folderstructure
Step 9
Navigate to your project

Find out where your project is and use the terminal to navigate to it.
The cd command stands for change directory!

Once you find out where your project is, you can type something like:
cd Path/To/My/Project

Terminal
Check Your Work
Step 10
Check with an instructor!

Check that you've navigated to your folder directory with an instructor

Folderstructurecheck2
Planning
Step 11
We'll be finally uploading your unity project to github

We'll go through a series of commands, make sure to type them in one at a time!

Step 12
Initializing your git project

git init
This creates your git repo

Step 13
Setting your credentials up

git config --local user.email "TheActualEmailYouUsedForGithub@ReadMePlease.Com"

Step 14
Connect your local project with your github project

Find the link to your repo on github.

Linktomyproject

Then type this in and replace the link with your link.
git remote add origin https://TheLinkYouFoundOnGithub.com/YourProjectProbably

Step 15
Get the stuff on github into your repo and make your local directory into your master repo!

git pull origin master

Step 16
Log all your changes in your current project to git

git add .

Step 17
Save all those changes you just logged!(with a message of course)

git commit -m "My first Unity project on Github"

Step 18
Push it onto your online repo on Github.com

git push origin master

Check Your Work
Step 19
Check to see if your push got onto Github!
Pushed!
Information
Step 20
How to Work on your project at home

If you want to work on your project at home, use:
git clone https://theLinkYouCopiedAndPastedLikeInThePicture.github.com

Cloneathome

Now, after cd'ing into your newly downloaded directory, you can sync your project online using
git add .
git commit -m "Some Kind of commit message"
git push origin master

Using Unity with Version Control Info

Account

MVCode Clubs

Created By

Doggo t doggo

Access Level

public

For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach