Git Smart Learn Git The Fun Way With Unity Games

Tags: Git

Use Version Control w/GIT, SourceTree & GitHub from Scratch in Unity Video Game Design (3.8 hours)

Last updated 2022-01-10 | 4.8

- Learn the key concepts of the Git source control system
- Install git on Windows
- MacOS and Linux
- Install the slick visual tool SourceTree on Windows
- MacOS and Linux

What you'll learn

Learn the key concepts of the Git source control system
Install git on Windows
MacOS and Linux
Install the slick visual tool SourceTree on Windows
MacOS and Linux
Be aware of other visual tools including GitKracken and GitHub Desktop
Use .gitignore files intelligently to track only what matters
Create "feature branches" to allow you to explore new ideas safely
"Push" your work to GitHub or BitBucket for backup & sharing
Understand how to use the command line when necessary
Understand more about how the tool you use really works by watching file changes
Be prepared to collaborate on your project with others professionally

* Requirements

* Admin rights on your computer
* Basic computer skills including installing software
* Some coding experience enhances the experience
* but isn't necessary

Description

Want to learn Git without falling asleep? You're in the right place!

Learning version control can be tricky and boring, we're here to make it easy and fun. Using game development as the example project, we'll be showing step-by-step how to get into git (get it?).

By the end of the course you'll have an indispensable tool, that will allow you to...

  • Protect your valuable work using git version control.

  • Explore creative options using Atlassian's SourceTree & the terminal / command line.

  • Backup efficiently to the Internet, specifically GitHub but GitLab and BitBucket are mentioned.

  • Learn all the common version control workflows that you'll need day-to-day.

  • Lay the foundations for collaboration with others.

You won't only be learning the science of version control, but the art too. For example you'll learn common usage patterns that keep your live simple, and even how to setup your online portfolio to show your work in the best light.

Your instructor Ben Tristem is the founder of GameDev tv, and has taught 100,000s of students to code and use creative software from scratch, so you're in good hands. No prior experience of version control, git, or coding required.

We'll be covering Windows, however MacOS and Linux users can also follow along with a little modification.

Get plugged into our communities of amazing developers on Facebook (nearly 20k), in our own TA-curated Community (17k views/day), and our student chat group (10k live at any one time).

Let's dive in and get this mini super-power learnt in no time!

Who this course is for:

  • Anyone specifically interested in learning Git
  • Anyone interested in using "source control", or "version control"
  • Unity and other game developers who want to version their work
  • Freelancers and creatives who want to learn a super-solid new tool

Course content

5 sections • 47 lectures

Why You Should Take This Course Preview 01:55

Ben Tristem, founder of GameDev.tv, explains why this is a good course to take. If it's been a while since you signed-up it's a good idea to start with this video.

Community & Support Preview 04:35

In this video (objectives)…

  1. About the GameDev.tv Discord live chat server

  2. About the GameDev.tv community forum

  3. Where to find the resources on Udemy

After watching (learning outcomes)…

You'll be able to ask for help when you need it.

(Unique Video Reference: 1_IS_GIT)

What Git Can Do Preview 05:56

In this video (objectives)…

  1. Git can help you revert your work

  2. Git can protect you against version upgrades

  3. Git can help you explore alternative approaches

  4. GitHub can help you share your work online

After watching (learning outcomes)…

Cite at least one benefit of using the git ecosystem.

(Unique Video Reference: 2_IS_GIT)

The Ecosystem Preview 04:42

In this video (objectives)…

  1. How git is the version control software

  2. SourceTree, GitHub Desktop & GitKraken as GUI options

  3. BitBucket, GitHub and GitLab as online options

After watching (learning outcomes)…

Name at least one Graphical User Interface for Git, and one online git hosting service.

(Unique Video Reference: 3_IS_GIT)

Mid Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Setup GitHub Preview 05:30

In this video (objectives)…

  1. Setup your GitHub account (or spruce if if you have one)

  2. Share the account with our community

After watching (learning outcomes)…

You'll have a basic GitHub account setup

(Unique Video Reference: 4_IS_GIT)

Setup SourceTree (PC) Preview 06:31

In this video (objectives)…

  1. Download Atlassian's SourceTree app

  2. Login to your Atlassian account to allow app access

  3. Optional: Log SourceTree out of your Atlassian account!

  4. Log SourceTree into your GitHub account

After watching (learning outcomes)…

Install SourceTree on PC and connect it to GitHub

(Unique Video Reference: 5_IS_GIT)

Setup SourceTree (Mac) Preview 07:17

In this video (objectives)…

  1. Download SourceTree on Mac

  2. Login to your Atlassian account

  3. Connect SourceTree to GitHub

  4. Deal with some Mac specific issues

After watching (learning outcomes)…

Install SourceTree on MacOS

(Unique Video Reference: 6_IS_GIT)

About Unity & Wrap-up Preview 03:26

In this video (objectives)…

  1. Thanks for sticking with me

  2. We’re all setup on Mac & PC

  3. Faith Linux people will keep up

  4. Will also need Unity setup. You’re project ok.

  5. Let’s start using it next!

After watching (learning outcomes)…

Feel ready to start using version control

(Unique Video Reference: 7_IS_GIT)

End Of Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Intro & Red Porcupines Preview 07:18

In this video (objectives)…

  1. An overview of PRIRP

  2. Project > Repo > Ignore > Remote > Push

  3. Do NOT try and follow along

After watching (learning outcomes)…

Have an outline understanding of the section's outcomes.


(Unique Video Reference: 1_UG_GIT)

PROJECT Setup Preview 03:52

In this video (objectives)…

  1. Create a minimal Unity sample project

  2. Learn about the 100MB single file limit with GitHub

  3. Know where to find your project on disc

After watching (learning outcomes)…

Know about git's 100 MB file limitation, and that otherwise you can get going right away.


(Unique Video Reference: 2_UG_GIT)

REPO Initialisation Preview 05:50

In this video (objectives)…

  1. Show hidden files in Explorer / Finder

  2. Create new local repository in SourceTree

  3. Notice the .git folder that’s created

  4. Demonstrate how SourceTree bookmarks work


After watching (learning outcomes)…

Create a new local repository in a project directory.


(Unique Video Reference: 3_UG_GIT)

IGNORE Files Preview 07:10

In this video (objectives)…

  1. Ignore the Library folder

  2. Observe the .gitignore folder that’s created

  3. See GitHub’s list of .gitignore files

  4. Update with the latest Unity .gitignore


After watching (learning outcomes)…

Use a .gitignore file to prevent git from tracking certain patterns of files.


(Unique Video Reference: 4_UG_GIT)

Mid Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Stage & Commit Preview 07:25

In this video (objectives)…

  1. Stage your file changes consciously

  2. Write a meaningful commit message

  3. Take a quick look at the history

  4. Make another project change

  5. Stage and commit these new changes

  6. Congratulations on starting to build a history


After watching (learning outcomes)…

Stage the files you want to track, and commit to git.


(Unique Video Reference: 5_UG_GIT)

REMOTE GitHub Repo Preview 07:14

In this video (objectives)…

  1. Setup a new repository on GitHub.

  2. About naming repos, and bookmarks.

  3. Do NOT add a readme, .gitignore or license at this stage (keep it bare)

  4. Add the remote to SourceTree.

After watching (learning outcomes)…

Create a bare remote repository on GitHub and connect it to git via SourceTree.


(Unique Video Reference: 6_UG_GIT)

PUSH & Wrap-up Preview 06:37

In this video (objectives)…

  1. Recap the whole process so far.

  2. Push our "master branch" to GitHub.

  3. See what's changed in SourceTree.

  4. See what's changed at GitHub.

After watching (learning outcomes)…

Push your project to GitHub.


(Unique Video Reference: 7_UG_GIT)

End of Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Intro & Stashing Preview 04:48

In this video (objectives)…

  1. About our Unity Course Community Facebook group.

  2. How to use Stash with git.

After watching (learning outcomes)…

Stash your work when you want to go back to a previous commit.


(Unique Video Reference: 1_CC_GIT)

Commit Preview 06:47

In this video (objectives)…

  1. Commit a few example changes.

  2. See how this impacts SourceTree.

  3. Understand the difference between local and remote.

After watching (learning outcomes)…

Fell confident in "committing" changes to version control.


(Unique Video Reference: 2_CC_GIT Commit)

How To Use Branches Preview 08:22

In this video (objectives)…

  1. Experiment with creating "hanging" branches.

  2. Do your first formal challenge.

  3. Understand what a branch is.

After watching (learning outcomes)…

Create a new branch, and switch between branches.


(Unique Video Reference: 3_CC_GIT)

Introducing Merging Preview 06:43

In this video (objectives)…

  1. Demonstrate a simple merge.

  2. Experience your first merge conflict.

  3. Practice merging branches.

After watching (learning outcomes)…

Perform a conflict-free merge.


(Unique Video Reference: 4_CC_GIT)

Mid Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Simple Merge Conflicts Preview 08:06

In this video (objectives)…

  1. Decide to use a hanging branch's assets.

  2. Retrospectively fix the root cause.

  3. Perform a merge.

  4. Resolve using "mine"

After watching (learning outcomes)…

Resolve simple merge conflicts using "mine" or "theirs".


(Unique Video Reference: 5_CC_GIT)

Revert or Reverse Commit Preview 05:14

In this video (objectives)…

  1. See how "reverse commit" works.

  2. Reverse a change from a previous commit.

  3. Practice doing this yourself.

  4. Also see about "Reset current branch to this commit".

After watching (learning outcomes)…

You'll be able to reverse the changes made in previous commits.


(Unique Video Reference: 6_CC_GIT)

Section Recap Preview 02:42

Ben Tristem recaps what he taught you about Git, GitHub and SourceTree in this section.

(Unique Video Reference: 7_CC_GIT)

End of Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Section Intro Preview 01:06

In this video (objectives)…

  1. What's coming up in this section.

After watching (learning outcomes)…

Know what to expect from this section.


(Unique Video Reference: 1_RW_GIT)

GitHub Structure 101 Preview 09:23

In this video (objectives)…

  1. How GitHub contributors, repositories, branches and profiles relate.

  2. About the ownership of repositories.

  3. What to consider when customising your GitHub profile.

  4. Improve your profile and share with the community.

After watching (learning outcomes)…

Improve the structure of your GitHub profile.


(Unique Video Reference: 2_RW_GIT)

Cloning Remote Repos Preview 07:15

In this video (objectives)…

  1. Visit the Complete Unity Developer 2.0 organisation.

  2. Clone any game you fancy.

  3. Upgrade it to the latest Unity.

  4. Check the game runs.

  5. Commit.

After watching (learning outcomes)…

Be able to clone a public repository on GitHub to your local machine.


(Unique Video Reference: 3_RW_GIT)

Introducing The Terminal Preview 07:29

In this video (objectives)…

  1. Make a code change in a project.

  2. Observe how the "hunks" and line insertion / deletions work in SourceTree.

  3. See how the changes are shown on the terminal.

  4. Stage from the terminal with git add .

  5. Commit using git commit -m "My commit message"


After watching (learning outcomes)…

Be able to commit from the command line (AKA terminal).


(Unique Video Reference: 4_RW_GIT)

Mid Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

How & When To Force Push Preview 06:58

In this video (objectives)…

  1. How to quickly get to your online repository from SourceTree.

  2. Use "reset hard" to destroy information locally.

  3. Try and force push with SourceTree or git push -f

  4. Learn about GitHub's branch protection system.

  5. Do your on first force push - consciously.

After watching (learning outcomes)…

Perform a force push, and understand you usually "shouldn't" do it.

(Unique Video Reference: 5_RW_GIT)

Diff Stats For Refactors Preview 08:50

In this video (objectives)…

  1. Clone Realm Rush. Checkout pt-ring-buffer.

  2. Define refactor and look in GUI.

  3. Run git diff and explain in less and use q.

  4. Add the SHA to the diff.

  5. Add --stat to the command.

  6. Filter by *.cs.

  7. Final command git diff e1eb974e334e7d0ea0b7d3ef3ec37448633b3c95 --stat *.cs


After watching (learning outcomes)…

Use the terminal to examine the net effect of a refactor sequence.


(Unique Video Reference: 6_RW_GIT)

Picking Cherries Preview 07:02

In this video (objectives)…

  1. Cherry pick “Target closest enemy”.

  2. Show how to “refresh” your repo view.

  3. Explain why we have a merge conflict.

  4. Show that Stash doesn’t work right now.

  5. Show you can Stash to abandon cherry pick.


After watching (learning outcomes)…

Use "cherry pick" to pick file(s) from somewhere else in the history.


(Unique Video Reference: 7_RW_GIT)

Large File System (LFS) Preview 10:41

In this video (objectives)…

  1. Initialise Git LFS & track large files

  2. git lfs migrate import

  3. Note how history changes

  4. Push to GitHub


After watching (learning outcomes)…

Use Git LFS to track files over 100MB and send them to GitHub, even if they are already in your history.


(Unique Video Reference: 8_RW_GIT)

A Tour of GitHub in 2019 Preview 07:30

In this video (objectives)…

  1. A systematic tour of the GitHub website.


After watching (learning outcomes)…

Understand what GitHub has to offer better.


(Unique Video Reference: 9_RW_GIT)

Blame & History Preview 03:46

In this video (objectives)…

  1. See the "Raw" view on GitHub.

  2. See the "Blame" view on GitHub.

  3. See the "History" view on GitHub.


After watching (learning outcomes)…

Use "Blame" on GitHub to determine in which commit every line of code in a file was added.


(Unique Video Reference: 9b_RW_GIT)

Section Wrap-up Preview 01:27

In this video (objectives)…

  1. Thanks for completing the section

  2. We’ve learnt a lot more about GitHub

  3. And by proxy GitLab and BitBucket

  4. We’ve unlocked the power of the Terminal

  5. Learned some important day-to-day tools

  6. Git LFS is pretty cool, see next section for Unity

  7. Thanks for being our student

  8. See you in the next section, or another course.


After watching (learning outcomes)…

Recall what was done this section.


(Unique Video Reference: 10_RW_GIT)

End of Section Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

Section Introduction Preview 01:45

In this video (objectives)…

  1. Unity Engine focus in this section.

  2. Using Unity 2019 but should apply in future.

  3. Use Unity’s GitHub integration for VCS in engine.

  4. See how to merge scenes together.

  5. Understand prefabs better.

  6. Learn more about team workflow.


After watching (learning outcomes)…

Understand what's coming this section.


(Unique Video Reference: 1_UG_GIT)

Serialisation & Prefabs in Unity Preview 09:01

In this video (objectives)…

  1. Visit Project Settings > Editor.

  2. Set Version Control > Mode to "Visible Meta Files".

  3. Set Asset Serialization > Mode to "Force Text".

  4. Look at impact of making changes in the scene.

  5. See how prefabs can prevent changes to a scene file.


After watching (learning outcomes)…

Use version control as an "x-ray" machine, to determine how Unity really works in terms of file changes.


(Unique Video Reference: 2_UU_GIT)

GitHub for Unity Plugin Preview 08:08

In this video (objectives)…

  1. Install GitHub for Unity from the asset store.

  2. See what changes the plugin makes.

  3. Commit the changes to the Plugin directory.

  4. Explore the features of the plugin.

  5. File locking to be covered in a future video.


After watching (learning outcomes)…

Install, commit and push using the GitHub for Unity plugin.


(Unique Video Reference: 3_UU_GIT)

Locking Files For Collaboration Preview 05:11

In this video (objectives)…

  1. Overview the lock > commit > unlock process.

  2. Remember not to commit changes to locked files.

  3. Walk through examples of how to lock, release and commit.


After watching (learning outcomes)…

Use locks within the GitHub for Unity plugin to aid in collaboration.


(Unique Video Reference: 4_UU_GIT)

Final Quiz

A few simple questions to help you consolidate your knowledge. Feel free to look things up as you go, this isn't a memory test.

BONUS & Course Wrap-up Preview 01:20