-: In this section we're gonna walk through a little bit
of initial work with GitHub.
We're gonna set up first a GitHub repository,
that's going to house all of our code.
We're then gonna set up a local Git repository.
We're gonna connect the local Git repository
on your computer to the GitHub remote
that we're gonna set up.
And then we're gonna take all of our local work
and push it up to GitHub.
Now again, just like I said in the last section,
I'm going to assume that you've got working knowledge
of Git and GitHub here.
So if you don't,
well do your best to follow along,
honestly, you do have to do a little bit of additional setup
in addition to what I'm gonna show you,
if you've never used Git before.
If you are completely lost on Git,
I would encourage you to still watch anyways
and you'll probably absorb just a little bit of stuff.
So let's get to it.
So step one is going to be to create a new GitHub repository
so I'm gonna first navigate to GitHub.
I'm gonna make sure that I'm signed in.
And then on the top right hand side,
I'm going to click the little plus button,
and create a new repository.
I then get prompted for the name of my repo,
I'm going to name this docker-react.
So feel free to name the repository whatever you want,
just keep in mind that if you use a different name,
you're gonna have to change a couple of different commands
that we're going to run.
After you put in the repository name,
do be sure to mark the repository as public.
A ton of stuff that we're going to do is not going to work
the way you expect it to work if you set it up as private.
Now, on your own personal projects,
if you eventually want to use a private repository,
that is totally fine.
You're still going to be able to use the same flow
that I'm going to show you.
You're just going to have to add in some credentials
at some key steps along the way.
But for this first go through,
definitely stick with public.
After verifying both those settings,
I'll click on "create repository,"
and then I get prompted right here with a link
to the GitHub repository that was just created.
So I'm gonna copy this link,
and then I'm gonna go back over to my command line,
and we're going to set up a Git repository.
If you're following along with Git on your own,
and you kind of want to go through these steps yourselves,
we're essentially going to do what it says right here,
more or less.
All right, So I'm gonna flip back onto my terminal,
and I'm going to make sure that I'm inside of
my front end directory.
And then inside of here,
I'm gonna create a new Git repository by running
Git in it, like so.
I'll then add all the work that we've done so far,
by writing git/add.
and then I'll commit all that work with gitcommit/in
and then a set of double quotes,
and inside of there I'll say "initial
commit."
and I'll close the quotes off.
Okay, so that's gonna commit all of our work.
Now we're gonna set up the remote,
and this is what's going to tie this local Git repository
that we just created,
to the GitHub repository that we made a second ago.
So I'll write out, "git remote add origin",
so essentially adding a remote that is called origin,
and then we're going to provide the link to that remote.
And the link to that remote
is the one that we just copied right here.
So I'm gonna paste that link in,
hit enter,
and we're good to go.
Now the last thing to do is push all of our work
up to that remote.
So I'll say "git push origin master".
Okay, so that's gonna push all of our work up.
I should then be able to flip back over to GitHub
on my new docker react repo.
I'll hit refresh,
and then I'll see all of my work up here and here.
And so most notably,
I really wanna make sure that I've got my docker file
inside of here.
All right, so that's pretty much it for GitHub set up.
Now we are going to come back to GitHub
at a couple of different times,
to kinda walk through this whole big flow
that we're gonna go through with pull requests
and feature branches and whatnot.
But for right now we're gonna start to pivot
and focus on a little bit of setting up travis CI.
So quick break and I'll see you in just a minute.