WEBVTT

00:04.260 --> 00:08.540
Hello everybody and welcome to this lecture where we are going to talk about version control.

00:08.550 --> 00:13.440
Now we've touched on this very early on in the course when we were talking about save versions within

00:13.440 --> 00:17.120
blender or even just saving as when you're working on a blend file.

00:17.270 --> 00:21.710
Now we're about to embark on a much larger project than we've had before.

00:21.750 --> 00:25.300
So it's important to try out some version control.

00:25.350 --> 00:29.930
Now you don't have to do this by all means but I've found it a real godsend to being able to do that.

00:30.060 --> 00:35.690
And being able to roll back to a previous version or even decide well I want to try and experiment.

00:35.820 --> 00:40.950
And if I do that I've got to remember that I need to back up all these other files zip them up and do

00:40.950 --> 00:43.280
loads of other things that are just too onerous.

00:43.290 --> 00:48.330
However if you use a version control system even something like source tree or in this case I'm going

00:48.330 --> 00:49.840
to have a look at get cracking.

00:49.980 --> 00:56.220
What you'll be able to do is commit a change that you've made and then continue experimenting or continue

00:56.220 --> 01:00.340
working whether or not that's adding textures trying different things out.

01:00.500 --> 01:06.270
Now I wish I knew about this when I first started because it's it's so powerful and it's enabled me

01:06.270 --> 01:11.490
to jump back try things without the fear of losing or messing up any of my work.

01:11.640 --> 01:16.020
Especially if you end up moving a file out to another folder or something along those lines.

01:16.110 --> 01:19.000
At least with this system you can roll back to it.

01:19.110 --> 01:25.470
So it's kind of like a real time or rather when you choose backup of the entire state of your project

01:25.590 --> 01:26.990
if you so choose.

01:27.000 --> 01:28.770
So we're going to have a look at gitt cracker.

01:28.780 --> 01:30.240
That is one I favoured.

01:30.270 --> 01:36.240
You'll see me using source tree in the course itself but since I've recorded those videos I've come

01:36.240 --> 01:42.420
back and have realized that did happen is much more friendly especially to artists rather than coders.

01:42.450 --> 01:47.580
So let's go ahead and have a look at it Kracken now and just show you around the rough premise of what

01:47.580 --> 01:53.700
source control is without diving too deep because we only want to use it at the moment to back up our

01:53.700 --> 01:58.310
work as we go and be able to fall back to a previous version if necessary.

01:58.350 --> 02:02.130
So let's now hop on over onto our web browser in fact not blender.

02:02.130 --> 02:04.240
First of all and go have a look out.

02:04.390 --> 02:05.000
Em.

02:06.700 --> 02:11.440
Okay so what I've done here is I've gone to Dubey w w doggett's Kracken dot com.

02:11.620 --> 02:16.060
Now I must say at this point I'm not endorsing them as in go out and buy them etc..

02:16.060 --> 02:19.330
I've just found personally that this system works for me.

02:19.330 --> 02:23.720
There are many other version control systems out there that you can go off and do your own research.

02:23.770 --> 02:27.730
If you find this is the sort of thing you actually find helpful.

02:27.800 --> 02:33.060
So I'm going to download this right now it's free which is one of the reasons why I really like it.

02:33.220 --> 02:35.380
And then it'll take a few minutes to download.

02:35.380 --> 02:37.320
It's about 120 megs or so.

02:37.450 --> 02:41.260
And of course they've got a tutorial there to get you a get started.

02:41.260 --> 02:43.140
Do go ahead and watch that as well.

02:43.150 --> 02:49.060
If you struggle at all it can be quite confusing when you first go ahead and try out source control

02:49.060 --> 02:50.130
for the first time.

02:50.230 --> 02:55.700
But once that's downloaded we can go ahead and install that now after you've installed it.

02:55.990 --> 02:59.900
Launch the program for the first time and I'll see there in a second.

03:01.380 --> 03:06.390
And then after a few moments you'll be presented with this screen with two signing options for the signing

03:06.390 --> 03:09.290
with haab or create a gift crackin account.

03:09.480 --> 03:13.050
I already have a tub accounts I'll be using that method to sign in.

03:13.140 --> 03:17.340
However if you don't know what that is or this is the first time you've gone to source control just

03:17.340 --> 03:21.590
go through creating your own get Kracken account and go through that.

03:21.600 --> 03:22.440
Now I'm going to sign in.

03:22.440 --> 03:25.400
We've got haab and I'll be back in a few moments.

03:25.500 --> 03:26.070
And there we go.

03:26.070 --> 03:29.920
For me that was nice and quick it signed it instantly because I was already signed.

03:29.930 --> 03:31.270
So what do we do from here.

03:31.410 --> 03:37.050
Well the first thing we need to do is create our new repository now repositories basically like a folder

03:37.050 --> 03:39.560
where you going to store all of your project work.

03:39.570 --> 03:44.190
Now I do recommend not storing all of your blender work in here but just the project you're working

03:44.190 --> 03:45.380
on at the time.

03:45.390 --> 03:48.120
So in this case I'm going to end it says here quite easy.

03:48.120 --> 03:49.110
Set your preferences.

03:49.140 --> 03:54.250
I'm fine with where things are at the moment but I'm going to open klown or initialise a repository.

03:54.270 --> 03:55.970
That's the thing we're going to do here.

03:55.980 --> 03:57.290
That's like clicking new.

03:57.450 --> 04:01.950
So initialising a repository someone want to click on the folder here and go down to in it.

04:01.950 --> 04:08.070
Now I've got a series of other options here which you can use if you were if you already had a repository

04:08.070 --> 04:10.670
on your computer that you wanted to open up clone.

04:10.680 --> 04:12.180
Well we're not going to touch that at the moment.

04:12.180 --> 04:17.800
That is if you're using gifts online which is a type of version control system.

04:17.840 --> 04:22.770
But we're just going to use it on the computer and that's why we're using local Only as well so we can

04:22.770 --> 04:25.850
bat browse a repository path we can go into here.

04:25.980 --> 04:30.790
And I'm just going to set it to my desktop for the moment and I'm going to put a folder on my desktop

04:31.530 --> 04:35.770
and I'm going to call it repo short for repository test.

04:35.850 --> 04:37.110
I'm going to select that folder.

04:37.140 --> 04:41.040
Now it is important at this point that the folder is empty.

04:41.040 --> 04:42.330
That is quite standard.

04:42.330 --> 04:44.340
It starts off completely empty.

04:44.340 --> 04:49.100
There are other things here called A Gift ignore and a licence were not going to do that at this point.

04:49.140 --> 04:50.810
We've got nothing that we want to ignore.

04:50.810 --> 04:55.680
We want to keep everything and our licence Well that's to do with how you sharing it how people can

04:55.680 --> 04:56.880
use it etc..

04:57.010 --> 05:00.030
So go ahead and create a repository a few seconds later.

05:00.120 --> 05:01.310
It looks like this.

05:01.350 --> 05:02.250
So what do we do now.

05:02.310 --> 05:07.780
Well let's demonstrate what will happen if you go ahead and start adding things to that folder.

05:07.980 --> 05:09.770
So let's go ahead and open up blender.

05:09.960 --> 05:14.130
And when we open up blender let's say we've got our default cube I'm going to Blender's opened up on

05:14.130 --> 05:15.040
another screens.

05:15.060 --> 05:16.380
Drag it down here.

05:16.410 --> 05:23.670
Now if we were working on let's say this default Q1 we go ahead and save as an go to our desktop into

05:23.730 --> 05:31.080
repo test and call it repo test because that is exactly what we're doing and save now if we go straight

05:31.080 --> 05:37.080
back in to get Kracken in this case and this would be the same most other source control programs it

05:37.080 --> 05:39.120
has noticed a change.

05:39.190 --> 05:46.560
And at the top here we can commit that change so I can call this starting cube and I can type in here.

05:46.560 --> 05:49.100
I can also type it in over on the side as well.

05:49.200 --> 05:53.210
The commit message so I could in the bottom here I can alter what it says.

05:53.250 --> 05:58.800
So starting QB typed in here in the lower right we can type in starting QB again if we wanted to and

05:58.800 --> 06:02.470
description this is where we start.

06:03.120 --> 06:10.020
Now you can also keep a text document alongside what you're working on to put in more detailed notes

06:10.080 --> 06:12.060
as you go and that's what I did personally.

06:12.060 --> 06:16.350
I have a text document that I update explaining what I'm doing and why.

06:16.350 --> 06:19.160
So once we've done that we have to stage our changes.

06:19.170 --> 06:24.150
Now in this programming gig Kracken we can see at the top there unstaged files there's only one of them

06:24.360 --> 06:28.750
and we can go ahead and stage that file and then commit the changes.

06:28.890 --> 06:35.200
So now at any point we can roll back to that point in time and recover the information that we had.

06:35.490 --> 06:40.710
But we need some more information on there so let's hop back into a blender and let's go in an edit

06:40.740 --> 06:46.680
part of this queue save our file and then we see or at least get cracking we'll see there's a change

06:46.680 --> 06:47.610
in that file.

06:47.820 --> 06:52.890
So I could call this and I'm going to do the commit message in the lower right this time stretched corner

06:53.640 --> 06:57.350
and one vertex moved also something along those lines.

06:57.350 --> 07:01.170
I mean what are you putting your description is obviously up to you because it would be based upon what

07:01.170 --> 07:02.330
you're doing.

07:02.580 --> 07:09.910
So one vertex moved and then I'm going to do one final thing which is stage that change and we can unstaged

07:10.020 --> 07:16.770
if we want or even if we wanted to revert to change that we made so you'd overwritten a particular texture

07:16.770 --> 07:18.250
or something along those lines you know.

07:18.270 --> 07:20.590
That took me ages to render out or something along those lines.

07:20.610 --> 07:25.440
We could unstaged that for a second and we see here we've got a repo test blend I can right click on

07:25.440 --> 07:31.800
it and discard those changes so we can just reverse one file back to a previous version if I want to.

07:31.950 --> 07:35.030
But let's stage all changes and commit the changes.

07:35.040 --> 07:38.610
And here we've got is started to build up a history of what we've done.

07:38.610 --> 07:45.270
Final thing here that's hop out and add in a different mesh let's add in a Taurus and plop it over there

07:45.540 --> 07:47.320
and finally save our file.

07:47.700 --> 07:53.340
So we made a lot of edits to here we come in and we go this is our final word or whatever you know there's

07:53.560 --> 07:55.200
there's lots of things you could do in there.

07:55.230 --> 07:58.920
And I'm just going to commit that you don't always have to put a description in you would only need

07:58.920 --> 08:00.580
to really put a description in it.

08:00.850 --> 08:07.180
Your description your actual title of your commit your snapshot in time as it were if you wanted to

08:07.180 --> 08:08.760
actually go ahead and use that.

08:08.800 --> 08:11.020
So how would you go back to STARTING it.

08:11.170 --> 08:16.410
Well if we go ahead and branch from it that is one of the safest ways to do it.

08:16.430 --> 08:22.240
If you go ahead and branch and we're going to call it reverts or something something along those lines

08:22.240 --> 08:28.350
for the moment as that's what we're testing we will now see over on the left hand side there's a master

08:28.780 --> 08:30.270
and there's a revert.

08:30.310 --> 08:36.160
Now they both look the same at the moment because this is a history if we go back and undo the reverse.

08:36.160 --> 08:43.180
Right click on starting cube and make sure revert is selected over on the side and then we can reset

08:43.240 --> 08:45.490
revert to this comet and hard.

08:45.550 --> 08:50.870
Now hard will discard as it says there all changes that you've done.

08:51.040 --> 08:54.010
And that's as if you've undone everything back to that point.

08:54.010 --> 08:55.380
There are other options too.

08:55.510 --> 08:59.420
But if I go hard here you can see that reverse ends up down here.

08:59.420 --> 09:03.870
And now if I hop into a blender again and go ahead and revert as well.

09:03.880 --> 09:10.430
Up here we can see that this has opened up that same file again if I go ahead and open in a number.

09:10.440 --> 09:10.900
Q.

09:10.950 --> 09:13.200
Adding another cube and save the file.

09:13.300 --> 09:20.770
We've now got two histories which is really useful so that I can call this to keeps or whatever it needs

09:20.770 --> 09:24.110
to be a stage my changes I commit my changes.

09:24.190 --> 09:26.080
I now have two histories.

09:26.080 --> 09:33.760
One was a starting cube to our final work and one was two cubes same project start different end points.

09:33.760 --> 09:39.550
Now we wanted to continue where we were before say the two cubes experiment was a failure that's fine

09:39.550 --> 09:45.850
we can double click on Master over on the left hand side you can see that the check out was successful.

09:46.060 --> 09:50.840
And then if we go ahead and open up blender what you see here is the.

09:50.920 --> 09:51.880
It's exactly the same.

09:51.880 --> 09:56.740
And by going to file and revert it's the same as re opening that file again.

09:56.920 --> 10:00.160
And we will see that it goes back to our previous version.

10:00.520 --> 10:04.810
And there we go there's a very brief overview of a version control system there.

10:04.930 --> 10:08.120
And I've used get crack and there are plenty more out there now.

10:08.170 --> 10:11.630
It isn't essential that you go ahead and do something like this.

10:11.630 --> 10:18.140
However from personal experience it's saved my bacon so many times when I've been working on a project.

10:18.280 --> 10:22.920
And it's also enabled me to do things that I'd otherwise be worried about doing.

10:22.960 --> 10:27.460
And it also means that I don't have a hard drive full of different files.

10:27.460 --> 10:32.980
In fact if we go ahead and have a look at that that folder that we had on the desktop I'm just going

10:32.980 --> 10:34.000
to bring it down.

10:34.120 --> 10:37.950
What we can see is that we have the gift folder.

10:37.960 --> 10:43.690
That's because I've got hidden files turned on you dont touch that we've got the read me and the repo

10:43.690 --> 10:46.930
test and there's no other files in there at all.

10:46.930 --> 10:52.680
So that means doesn't matter how many commits I make on the Repo test or if I had the blender projects

10:52.690 --> 10:58.510
within this project say if it was a part of a building that you're about to make for instance then you

10:58.510 --> 11:01.780
can go ahead and do that so that you fund it doesn't end up cluttered.

11:01.780 --> 11:06.760
If we were to do this in the more traditional save as sense it would be very hard to keep track and

11:06.760 --> 11:11.480
it's very hard for you to stay honest about what is the current usable version.

11:11.500 --> 11:16.150
And if you've got lots of what versions in there you're going to make a mistake at some point and it's

11:16.150 --> 11:18.120
going to be a really painful mistake.

11:18.250 --> 11:22.560
And I can guarantee you will want to avoid that where possible.

11:22.870 --> 11:23.860
Okay so there we go.

11:23.860 --> 11:29.100
If you've got any questions over version control do give us a shout otherwise enjoy using it.

11:29.110 --> 11:34.660
Embrace it because it is going to save your bacon so many times in the future and I will see you all

11:34.900 --> 11:36.120
in the next lecture.
