Section 7 (GitHub): Lesson 3 - Branches and Pull Requests
Hey you and welcome.
In this video we will be committing branching out and merging the branches back into the master branch
of GitHub using our GitHub desktop that we have installed.
So let's dive right into it.
I have the GitHub desktop open and we had cloned a repository called Test API in the previous video
and we're going to continue working with that.
Now notice in the GitHub desktop, I have the options to open the code in VS code or show in finder
or view on GitHub.
So just because GitHub and VS code are both owned by Microsoft, it's very easy.
They're integrated.
So I can just click on Open vs Code and it will just do that for me.
So let's do that first.
Great.
I want to zoom in a little.
All right.
So as you can see, the repo is empty.
And on the GitHub desktop, if I go back to that, it is waiting for some changes, local changes.
There are no local changes right now.
So let's make a local change.
And in order to do that, I do want to have the terminal open because I do want to make this into a
node application.
So let's open our terminal.
I'll use my I term here.
Perfect.
With that zoomed in, I can run commands.
I have to make sure I'm in the right directory.
And if I remember correctly, I had the GitHub folder in my documents folder and then oh, it's asking
me for permission.
Great GitHub folder, then test API folder, then we have no files inside it.
So that's the folder structure that I want to go to.
Remember, I press tab to get code to automatically give me IntelliSense here since there is no other
directory in github right now.
If I press tab it autocompletes it for me and says you're probably trying to go into test API.
That's the only folder left in here, so I press tab to do that.
All right, I'm going to press enter and that should take me directly inside the test API.
And, and you can see now that there is a main branch and that is coming from GitHub.
So our iterm is integrated with our GitHub, GitHub repo as well.
So what I'll do here is npm init y and y.
That should start my NPM project for me with a package.json.
Let's go back to vs code and let's see how it looks.
So yeah, there is a package.json.
It's the name is called test API and if I go back to my GitHub desktop there should be some changes.
There we go.
It's telling me that there is currently a change for Package.json.
You have added these lines.
This is plus sign.
So that means they're added.
Green also means added and I can save these changes now.
I have saved them locally, but if I go to my Firefox that's where I have GitHub open.
If I refresh this page, me changing that file locally didn't really do anything is the reason for that
is because we haven't committed and pushed the changes.
So there's two steps to it.
We have to commit first and then we have to push the changes for others to see on GitHub.
So how do we do that?
We go back to GitHub desktop and first things first.
At the bottom we will say there is a oh, in this case, great.
It actually is smart enough to know that I created Package.json so I can just say create Package.json.
That's, that's pretty cool.
And description.
You don't really have to provide that if you want to go right ahead and I'll just say commit to main.
Main is the only branch in our GitHub repo at the moment.
So that's the one that is going to go to.
So I'll go ahead and commit.
Perfect with the commit done.
Now I can push these changes.
So even at this point, if I go back to the browser and just refresh, no changes have made their way
to GitHub because I haven't pushed them.
So let's go back to GitHub desktop and click on publish branch.
And you can see they're loading up top.
And once that is done, no more local changes are reporting and the GitHub desktop.
And if I go back to the Firefox browser, refresh my page, I can see that there is now a package JSON.
So we have successfully created our first commit and we have pushed the changes as well.
Let's do more with it.
I do want to create an application out of it and I want to use GitHub branches to make that feature
happen.
So first things first, let's create a branch and go back to GitHub desktop and to create a branch I
would go into current branch section at the top and click on new branch.
And it will ask me for a name.
And in this case I will name it develop.
So this is my develop branch.
This is my this is where I will be developing mostly, and then I'll merge it back into Main when I
want to.
So I'll go ahead and create branch with that branch created.
If I go back to GitHub and Firefox, if I refresh my page, nothing has changed.
If I go to the branches section on the top left there is no develop branch because we haven't pushed
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Section 7 (GitHub): Lesson 3 - Branches and Pull Requests», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.