In the previous days, you learned how to upload your code to GitHub.
Today you're going to learn how to do the opposite.
So how to get code from GitHub.
And copy it on your local computer.
This is usually the case when you want to get code from other people repositories.
So you want to use that code.
You want to download it on your computer.
So for that, let's.
Search for a repository.
You can search for our that soldier teaching GitHub and then go to the first results so that will point
to.
To this account.
So you want to click there and then look for.
Repositories on the repositories menu here and you want to find the mine to do app.
Repository.
So you want to click there and let me tell you now how you can get this code to your computer.
There are two ways.
One way is the manual way, which is by going to this button code and then go to download zip.
So that will give you a zip file with all these files inside, and then you can extract that file and
then open a passion project and paste your files there.
That's one way, but a more professional way is to do cloning.
So a process, a git process known as clone.
So you clone this project.
To your porch, I'd.
Let me show you how to do that.
So go to Portugal and if you have a project open already, then you should go to get.
Clone.
Now you'll only see this clone option if this current project has git enabled.
If you have a project, for example this other project, this has not been enabled for version control.
In that case you should go to VC s and then go to get from version control.
So either way, whatever way you try.
After you press clone or get from version control, you should see this window.
No, this is the URL of the repository, the remote repository, which you want to get.
It's important to know that.
You will only be able to get public repositories.
From other people unless you know there.
Credentials.
So this is a public repository so you can go to code and then HTTPS and then copy that URL by pressing
this button.
So once that is copied to your clipboards, you want to go back to punch form and paste it to the URL
box.
No, the directory.
You should find an empty directory among your projects.
For example, our go to projects.
And inside this directory now.
Another directory will be created.
If I press clone though, I'll get an error.
It says the directory already exists and it is not empty.
That is because this projects folder.
Which is this one here already has this my to do app folder and I'm having this issue because the repository
is also called my To-Do app folder.
So that means I should either find another directory where there is no such a folder inside or delete
that folder.
So I'll So I deleted that folder and then I go to pie chart.
So again users as Dropbox projects press on clone.
And they want to choose whether you want to simply browse the code.
In that case, you want to just press on preview in safe mode.
Otherwise, if you know what you're downloading on your computer, you should press on trust projects.
So trust projects should download the code on your computer and you should be able to execute the code
if you want.
The new window or this window.
This window will close the existing project.
A new window will open.
A new window.
It doesn't matter what you press here.
I'll just press a new window.
And then you should normally get this.
Pop up a window.
Now, if you look closely to this repository, you'll see that there is a requirement that Tcx file.
This is a special.
File, which I'll explain later on in more detail.
So this file was uploaded by the person who has this repository, which happens to be me.
And also, I'll show you how we can upload this file later on.
Because this app is actually an app we're going to build in a couple of days.
So this is a web app, a do app, but it's a web app.
It's not a desktop app.
So this requirement that THC file contains the list of packages needed by this Python files.
So these are the modules, the third party modules, and I've listed those packages in this file and
now part charm has detected this requirements that CSV file.
So this is a convention.
Usually you always want to name it requirements that TXT file.
So Pancham has detected this file and it's asking us if we want to install the modules which are located
in here.
So you want to say okay.
And here you have the base interpreter.
So 3.10 in my case that will be used to run this project and that is the path to the.
Virtual environment.
So you want to press okay here.
And that should now install all those packages.
So this might take a while.
And so the third party modules were installed successfully in my case.
Now, if for some reason.
You don't have these modules installed, you can click on webcam spy.
You should see some red under the lines.
That means these modules were not installed.
So if part this didn't install those modules, you can go to the terminal.
You should see this vent, which means that.
Virtual environment is activated and then you should do PIP install dash or then requirements.
You can actually press tab to autocomplete the name so requirements the task and presenter that should
install those modules.
So in my case par charm install them because I got that window which asks me to install those modules.
But.
If that was not the case, then this is another way to install them with PIP.
Right now that my modules are installed, I can go ahead and run this app to see its output.
Now, this is a web app.
And as I told you before, we're going to ride this Web app from scratch in two days, about two days
from now.
But anyway, I can show you how to run this.
So with web apps, you cannot simply right click and run the files.
You want to go to the terminal.
And she wanted to scream.
Let's.
Tremlett is the third party model, which is used to develop this web app.
And you want to run Web dot pie, press enter.
You should wait half a minute or so the first time you run it.
So what is the name of this file that.
That is a file we are executing.
But the way to execute it is a bit different, as you just saw it, with three bullets run and that's
the app.
So the app opens on your browser.
This is running locally currently, so it doesn't have a public URL just yet, but I'm going to show
you how to make this public so everyone can visit your web app in two days, as I already mentioned.
So that's how you can clone a project, which is a public GitHub repository.
So this repository now is also.
Connect it to a local git.
You can click on kids.
You can see the commits here, which the author did one develop when they develop this app.
And if you want to create your own GitHub repository where you are, upload this app.
You can do so.
So for that, first of all, you want to go to your GitHub account and then create a new repository.
Puts a name for that.
My new To-Do app, for example, make it public or private and creates a repository.
Then you want to copy that link.
So copy it and then you want to go back to your project.
So that's a web app we cloned.
And then you want to go to Git go to manage remotes.
So what I'm doing here is I'm adding a new remote, as you see, that is the remote of the person who
wrote the app.
And you cannot push the changes to this repository because it's not your.
GitHub account.
So you want to add a new repository, which is part of your own GitHub account.
As the name you can place here, anything you want.
For example, your name and the URL goes the repository I just copied when I just created this new repository
on my account.
So press.
Okay.
Press.
Okay, there again.
And then to upload this project to that repository which we just created.
You want to go to push.
And then you want to press on Origin.
So Origin is one of the remote repositories.
You see origin and audits.
So if you press on origin, you should be able to change it to the other repository.
So now.
All these files are going to be uploaded to that repository on your GitHub account.
So I got this message pushed Master to new branch and if I refresh.
I should see the farce.
In my repository.
In my case, it happened that both the repositories were in the same GitHub account, but it doesn't
matter.
So as long as the original repository was public, I could clone it on my passion project.
And then I can create a new repository where I have access to, for example, this one and I can upload
it back to that.
You can see that the commits here were synchronized with the commits of the original author, which
was seven days ago.
So these these are not my commits in this project.
These were the commits of that original project.
Yeah, that's.
I thank you for following this video.
So now you know how to clone projects.
And I'll see you later.
See?