This video is just additional practice or reinforcement on the basic pushing workflow.
Add commit push up to GitHub and repeat.
So if you feel good about that, move on to the next video where I talk about cloning your own repos.
Option two But for now, I'm going to go back to my first novel and nothing super exciting in here.
But why don't we make a new branch?
What branch are we on right now?
We're on this empty branch.
What would be a good branch to make?
Why don't we go back to Master?
So I'm going to switch get switch master and I'm going to pretend to do some more work.
We've got chapter two, three, four.
Why don't I remove this mood board?
I'm just going to get rid of that.
So I'm going to do an REM dash ref mood board.
So I got rid of that folder.
I'll do a get status, I'll add all those changes, get commits, delete mood board folder.
So now we have this new commit that only exists here locally on my repo, on my laptop, on the master
branch, not up on GitHub.
So now I'm going to switch to the empty branch, get switch empty.
I'm going to make another commit on this branch.
So what do we have in here?
Not a whole lot.
Why don't I make a new file?
I'll call this one.
Characters outline.
How about summary text?
And then I'm just going to add that empty file and commit it.
Add summary file.
Okay.
So now we have a commit here on empty that is not on GitHub and we have a commit on master that is not
on GitHub.
So let's push both of them up.
It's going to take two commands.
Right?
We need to first decide, let's push up Master Branch or let's push up the empty branch.
Remember the syntax get push and then our remote is origin.
That's the only one we have.
And then I'll push the master branch to begin with.
Okay.
So if I come back to my GitHub and I refresh, I don't see anything new here.
Right.
Because I'm still on the empty branch on GitHub.
I'm looking at the empty branch.
But if I switch to the master branch.
We can see this new commit 2 minutes ago delete mood board folder and we don't see the mood board here
anymore at all.
So I can take a look at that commit specifically see what was deleted as you see there, the whole Moodboard
directory and its image contents.
So that new commit was pushed up.
Whatever new commits existed on the master branch but on the empty branch nothing has changed on GitHub.
Remember on my local empty branch, which I'm on right now, we have this new file summary and we have
a commit called well what was it, add summary file.
That was the message.
So if I want to push that up, I need to do git push origin and then the empty branch.
And if we head over here refresh at some points.
Here we are.
Empty had recent pushes less than a minute ago and we see summary text that was pushed up and the commit
that it was associated with add summary file two days ago.
So that's yeah, that's pretty much all I wanted to show you here.
Right, that basic workflow, do some stuff locally on a branch, make some commits and then you push
that branch up.
And that about wraps up the basics of using the push command.
We have a branch locally, we push it up with git push remote and branch name, then GitHub.
Now has that branch hosted in the cloud.
And then we repeat that if we want to push another branch up now you don't have to push every branch
you make up.
Often what you'll do is have a master or a main branch and then you'll have branches where you work
on features.
You can merge those into Master Main and then push that new master slash main work up.
Or you can push branches up to GitHub and just have a whole bunch of branches.
But that's something we'll talk about when we get to workflows.
All right.