Hey, welcome to today's programming tool.
Today, you're going to learn how to use GitHub, and I'm going to take you step by step.
We're going to start from creating a GitHub account to connecting your GitHub account with your partner
on projects.
And then uploading your files to GitHub.
As you know, GitHub is a code hosting site so you can upload your code to GitHub and that code in GitHub
is synchronized with your code.
Let's now go through the steps of setting up GitHub and using it.
So our project.
It's currently connected to it.
We did this in yesterday's programming too.
So if I press on the Git tab here, I see I have two commits.
So if you haven't followed yesterday's programming to video, you need to go there and set up get.
Right.
With that in mind, you can open your browser, search for GitHub on Google and go to GitHub dot com.
GitHub is free, so you can go ahead and go to sign up to create a new GitHub account.
So just enter your email and your other data, such as your password.
I've created a GitHub account already, so I'm going to sign in with my
username and password.
So once you have signed up and signed in, you can go to this icon and go to new repository.
And you should see this view.
So what is a repository?
A repository is basically a project.
So for every passion project that you have, for example, we have this project.
Where we're building this Tutu app for every passion project, you want to have a GitHub repository.
So you might give this a name which is related to your project, such as To-Do app.
So to do.
Dash App.
This is saying that this is available because I don't have such a name in my GitHub account.
Therefore, the name is free and then you can give a description if you like.
I'll just leave it empty.
It's optional.
And then you can set this repository to public or private.
If you set it to public, that means everyone on the web can see your project files.
So they can see your code.
They can download your code.
They cannot modify your repository, so they cannot modify your.
Files, but they can see it if you don't want your files to be seen by anyone other than the ones you
share your your URL with and you give them access to.
Then you want to choose private.
But you can change later.
For now, I'll just keep it private.
I can switch on public later on in the get up settings.
Then these you can leave them as they are and press on creates a repository.
And this will give us this URL in here.
You can copy that by selecting it and copying it, or you can press this button to copy that URL.
Then you want to go to point.
So now we want to connect our project with that remote, remote URL so that our project is uploaded
to that remote URL, to that repository to to connect our project.
We want to go to the Git menu and then go to manage remote, and then you want to press the plus icon,
leave the origin name as it is, and here you want to paste that.
You URL that we got from the repository press.
Okay.
This might ask you to log in via GitHub if you haven't log in before.
So you want to press log in via GitHub.
So Patch is trying to authenticate you to make sure that you have access to that repository.
So then you want to go to authorize in GitHub.
And that's it.
You can close that page, go back to Power Charm, and this is added.
So this URL is added now.
It's part of this project.
And actually, if you go to file preferences, preferences or settings, and then you go to version
control, expand that, go to GitHub, now you'll see that my account, my GitHub account is connected
to Parcham.
So when we logged in via GitHub through that window of threat, that patch on window Parcham added our
account here.
So let me cancel that.
Just wanted to show you and the next.
So what can we do now with GitHub?
Well, so far we have been doing this commits.
So any time we add some features, maybe we do some code changes, we do a commits, we register that
change or that new feature, the code for that new feature or the codes for that change.
We reduce those changes in git through a commit.
And then by the end of the day, once you have done several commits and you you feel like you did a
lot, then you can do a push to get up.
So we have commit, which is this button here and now we have push, which is this other button.
If you press that button, you're going to see the list of commits here, which you haven't pushed yet
to get up.
So leave that as it is and just press on push.
And what that is going to do is it's going to upload the newest files, the newest version of the files
to GitHub.
You see, I got this message pushed master to a new branch origin master.
So if I go to GitHub now and wait a while, maybe a few seconds and then refresh the page.
And this is what you should see normally.
So all these are the files that we had in our chart project.
If you click any of them, you're going to see the contents of those files.
You see the directory path here.
So to the app is the repository and functions that p y is in that repository now.
So these are all the files we have included in the version control all the files that we have included
in Git so gets.
It's associated with GitHub, so GitHub will get only the files you have.
Add it to get.
And if you click here and this commits button, you're going to see the history of commits.
For example, if you want to see the files as they were in the initial commit you want.
To press that last button.
And this is all the files as they were back then.
So that is also something you could do in poor charm.
I showed you yesterday that you could do this by using that checkout revision, and that would also
display the files as they were in that initial commit.
So you could do a check out when you want to see the files and maybe you want to run them.
But if you just want to see the files, then perhaps you could just go to GitHub and use.
What I just showed you.
So again.
You go to the repository, you go to commits, that's the list of commits and that button contains the
code.
Of all the files as they were that.
Particular commit.
So that's about it.
We're going to keep using, get and get help.
We're going to keep committing new changes and pushing those changes to get up in the next days also.
So thanks a lot for following this.
See you later.