Okay, in the last video, we set up version control.
In this video, we want to set up GitHub.
And github.com is a website that allows free git repository hosting.
And it's super popular with coders, it's almost like a little social network,
you can see I've gone to github.com and logged in.
And, if you click on your profile, this is what it looks like.
If you don't have an account here, go ahead and sign up for one,
it's completely free and it's really cool.
So, to use this, and why this is important is,
right now we saved our code to get with version control locally.
But computers can break down.
Computers can blow up.
I've had computers melt, right?
I've lost all my data before, it's always a good idea to keep your code
somewhere else, especially up in the cloud somewhere for safekeeping.
And that's what GitHub allows us to do.
It's also cool if you're trying to get a job, because your potential new boss can
come to your GitHub account and look at your code.
This is all public.
You can make it private if you want, but I recommend you just keep it public.
Nobody's going to steal your code.
If you've got some top secret startup you're working on, then sure,
make it private.
But for everything else, just keep it public.
That way, potential new employers can look at your code,
they can see, she knows how to do this, this, and this.
This is the code she's written.
We can see that and it's really cool.
So, once you've signed up and logged in, head over to,
I just clicked on this little carrot over here and go to Settings.
And then click on SSH and GPG keys,
we need to add that SSH key that we created a couple of videos ago.
So let's head back over to our terminal.
And let's just catalog out that SSH key.
So it was at ~/.ssh id_rsa.pub.
So hit Enter, and then just highlight all of this.
I'm just clicking my button and dragging it, and right click and copy.
Now head back over to GitHub, and click this new SSH key.
You probably don't have any listed, I've got a bunch.
Just go ahead and click paste to paste it all in there.
You can give it a title if you want, but you don't have to.
And then just click add SSH key.
It may or may not ask you for your password.
I haven't logged in a while, so it's asking me for my password.
And that's all there is to it.
So now, we need to head over to your repositories.
We need to create a new repository for this project.
So you can see I've got 51 different projects already on here.
If you've got a course of mine, you can look at the code here.
But let's click New, let's just name it.
Let's call this My Django resume, name anything you want.
And here you can toggle between public or private, right?
It used to be pay for private, but Microsoft recently bought GitHub and
they've done away with that.
And now everything is free, which is very cool.
And now just click Create Repository.
And we're almost done, we need to push our original code to our new GitHub repository
and we do that right here.
So we need to copy these two commands into our terminal.
So I'm going to highlight this and click Copy.
And let's head back over to our terminal and right click and just Paste,
and hit Enter.
First one's done.
Now finally, the next one, the last one, Copy,
head back over to our terminal, Paste it in.
And hopefully, are you sure you want to continue?
Yes, It is pushing our code up there.
And it's done.
So, now we can head back over here and I just click reload on this page and
you could see here's my django resume.
Or you can go to your repositories.
And here it is my django resume, click on it.
And here's our entire code for our entire project.
And notice, remember that commit message from the last video,
removed about page, you can see it right here.
All the commit messages are listed right here, which makes this super useful.
And, you could see here's the files.
We actually did things too, when we remove the about page, very cool.
So, our code is up there, in the future if we want to make changes to our code.
So let's go to our homepage and
let's change this to John Elder's Tech Resume, right?
So we save this file, this is a major change.
We've got to save this to git and push it to GitHub, right?
Normally, you wouldn't for something so tiny.
But let's pretend this is a big change and we want to save this to GitHub.
So let's walk through this one last time.
So I'm going to clear the screen.
So we need to git add period to add it to our local repository.
We need to git commit -am.
And let's say, changed homepage title, right?
Now to push our code up to GitHub in the future forever,
from now on, we just type in git push.
And that's it.
So now we can head back over here.
And if we go back here to our django resume and
click reload, We see changed homepage title, right here.
Where did it do that?
Well, we did it in templates.
So let's click there.
Changed homepage title on our home.html page.
Okay, so let's look at that.
And we can see sure enough, if we kind of scroll down here,
it now says, John Elder's Tech Resume right there.
So very, very cool, all right?
So that's GitHub, that's version control.
Super simple, and very useful.
So in the next video, we're going to look at Heroku and start to install some things
we need in order to push our code to Heroku, and that'll be in the next video.