Welcome to setting up our repo and committing in this video.
We will set up our repository will register source tree.
Make sure that we come commit later on learn how to glued data from our repository stage our files and
finally make our first commit.
So one of the questions is how many repositories now on a complex projects you could use a repo perm
model that you create.
This would give you the best level of control.
But in this case it's going to be to develop our model simply aren't that detailed to warrant a repository
just with the model.
So you could track your whole project in a repo and that is what we're going to do.
Of course it will depend on the complexity of your project and how much control you need in that scene
in.
Very important.
Now talking about our repository which is going to store and track for changes in our prob project for
us we can exclude data from it and we do that to allow faster commits at a smaller size and that keeps
the database the repository simple and manageable.
We want to avoid storing derived or generated data in the repository wherever necessary.
An example here for instance will be our reference material they might be photos you gathered off the
Internet or even gone and taken yourself.
Those are going to be static not changing there's no point in storing them.
And they're very large files in comparison to everything else so we will want to exclude them.
There we'll go on to committing and it is important that you'll need to save all the documents that
constitute that commit first before staging them and then finally committing them.
Now this is going to be like saving our working folder and zipping it up at that moment in time.
But it's going to give us far more control over where we can go back to.
We can even pull out files from way in the past and bring them back to the present with a new direction
to them.
So let's go on over and first set up our repository and then go through and manage these other things.
So here we are in my file system I'm using a Mac here you'll be using Windows Explorer if you're on
that or wherever the limits equivalent is.
So we've got my home directory here I've created repo's and I've got two here that are called Game asset
PAC.
One is for tracking my videos that I'm creating for you guys right here.
And one of them is going to be an example sarm in a very similar position as you are and I want to show
you what mine's looking at so you're familiar with it when I use it from now onwards.
So I've got an example here that I'm going to make into my repository.
So first of all an if you've not already done this please pause the video now and go register source
tree.
If you've already done that then let's carry on.
Now I've already got some repositories here you can see I've got seven representing the seven sections
of the course so far.
Now you are not going to see anything here whatsoever.
But now we can go ahead and create a new repo so we can click on new repository and we go and create
a local repositories.
The third option down.
Once we've done that we've got this destination park here now.
Be careful.
It's very easy to think that this name underneath is going to create a folder.
If I just click create Now I would end up with a repo called my blender project which is great but it's
going to contain everything in my user section and I don't want that so I'm going to click these three
dots to the right hand side and simply go and select the one I've created which is this game pack example
and a click on Open.
Now this is the name of the project here and I'm going to name it my blender project that's absolutely
fine.
Type gitte.
That's what we want.
And here also create local remote repository.
Leave that one unchecked and go ahead and click create.
And there we go we've got a blender project that's appeared.
And if we go ahead and double click on that we can open it up and you should have something that looks
pretty similar to this so I'm just going to rearrange these windows a little because it's been opened
on a larger screen.
So we have a series of well this area at the top here is staged files and there's nothing at state it.
There's nothing ready for committing.
So one of the first things we need to do is make sure that everything we've been working with has been
saved and shut down.
So if you still got a blender file open that hasn't been saved.
As soon as we stage it I say this is ready for commit in its current state.
If you then go ahead and click save even though it's been staged before.
It won't be right.
So what do we need to do.
Well we do want to keep our message.
We can see meshes we can see here that the assets this is our directory that we've got so we've got
meshes under here which is going to collapse that with that little arrow we have got textures and my
details about how to nail textures I want to keep that.
And here is our reference material and as you can see I've just got a load of images from the Internet
so I've put a warning there do not use in the course directly which is why I've pulled a load of images
there.
Now I can select that and when I select that I can go up to actions and select ignore and it gives us
a series of options.
So here we've got to ignore exact file names if you got a specific file that you want to add to the
gate.
Ignore that we can have ignore all files with this extension.
And I don't want to do that because some of these pian Geez we're going to be producing pages later
on when we produce our own texture.
So we certainly don't want that.
I want to just ignore everything beneath.
And in this case anything that goes in that reference folder will not be added to our repository.
And I'm very happy to that.
The other thing to consider is where it says add this ignore entry to the global ignore list.
Now my folder name reference material do not use in this course.
No copyright for it.
We've got to bear in mind that the global ignored list will place anything with that particular folder
name onto it and that means every repo we then make going forward it will be included in the ignore
So if you have a name something like texture's or meshes that can be very dangerous because that will
mean that every other one but you ever use will be added unless you remove it from that global ignore
list.
So in general I wouldn't use global ignore list I do in this case but I would make sure it only applies
to this repository only so I'm going to go ahead now and click okay and that will ignore that.
I've then got a read me file which is what I have build up as I go.
Of course you may want to add notes as you go into a text file.
Perhaps that says at what stage you are thinking etc. alas a good log and of course you can update that
as you go.
So now that I've got my assets my meshes and textures I can just click up the top here and select everything
and we can see it moves from the bottom here to that SOP.
Now that we've done that it's red it's staged and it's ready for committing.
Now I like to keep my commit messages nice and short and put the detail about what's going on in my
read me file.
And here for instance I can say first commits because that is what it is we've now got stuff that we
can commit and I'm going to hit commit and there we go ah everything's disappear from the screen.
What's gone on here.
Well we're no longer looking at our what's called Master branch.
So on the left hand side you can see it says Master.
If we go ahead and click on that then we can see what's going on.
And that is the first kimmett.
Now we go ahead and change anything we'll have changes up on top.
So I am now going to show you my particular repository so you can see how it looks after you've done
a few commits.
Okay so we are both back over on my repository here and you can see I've got my initial commits down
here then I fleshed out my read me with what I want to do.
Basic folder structure made one of the lectures is there another lecturers here and this is going to
be the end of the 10th lecture.
So what I would do in this particular case is I'd make sure that all of my items that are needed were
state which is fine.
I'm going to go ahead and hit commits.
And these are the trials that I've been working on and I'm going to put in here the name of the lecture
that I am working on which is very powerful.
And I've got that in my paste buffer so I can just place that in now ordinarily Ah you're not going
to be using this push changes.
I am because I've got an online repo as well and we might cover that later on.
But don't worry about pushing changes here that's something I need to do.
You won't.
And once I've done that we can see that there are no more changes.
And I've now got that all set up and ready to go.
Okay guys so it's Challenge time.
I'd like you to make your commit so an optional task here is to create a text file explaining what you
have done that helps you keep track of your changes.
We can't really see what's going on in individual blender files and we want to keep those committee
names a short and succinct as possible.
Make sure you save all your open documents ignore your reference material stage your files and then
finally commit with the short and precise name as told what it is.
It's a title for that comment.
I've already done mine so ngoni to balls the video and I will see you guys in the next lecture.