WEBVTT

00:01.960 --> 00:08.040
Currently our git repository is only locally, but there are many reasons why it would make sense to

00:08.080 --> 00:11.200
use a service such as GitHub to backup our work.

00:11.440 --> 00:15.840
It also makes it easier to collaborate with others that are working on the same project.

00:16.280 --> 00:18.080
You don't have a GitHub account?

00:18.120 --> 00:21.120
Go to github.com, click on sign up.

00:21.120 --> 00:24.360
It is free to create an account and it only takes two minutes.

00:25.240 --> 00:30.880
Once you log into your account, try to locate the button that allows you to create a new repository.

00:31.120 --> 00:34.440
This is where we'll be storing our code within GitHub.

00:34.800 --> 00:37.080
I'm going to call my repository flashcards.

00:38.000 --> 00:44.320
I'm going to leave it public, and I want to make sure that nothing here in terms of initializing the

00:44.320 --> 00:51.480
repository is enabled, such as adding a Readme file or adding a git ignore or something like that.

00:52.160 --> 00:53.960
So let's go ahead and create a repository.

00:54.640 --> 00:56.720
Now we're going to see our repository.

00:56.720 --> 00:59.840
And from the options available we're going to select https.

01:00.880 --> 01:05.550
Copy this link here and then jump into cursor inside cursor.

01:05.590 --> 01:11.470
We're going to create a prompt asking the agent to push the local changes to this remote repository.

01:12.910 --> 01:15.190
So there are a few git commands that need to be executed.

01:17.510 --> 01:23.030
And this is where the interesting part actually comes when we're using the command git remote add.

01:23.070 --> 01:25.630
So now we are adding this remote repository.

01:26.190 --> 01:27.470
I'm going to run this command.

01:28.510 --> 01:33.110
And now is the part when we are actually pushing these changes to the remote repository.

01:33.590 --> 01:35.830
So this is another command that's going to be executed.

01:36.390 --> 01:44.510
And now we have a GitHub extension within Visual Studio Code that wants to talk with the GitHub server

01:44.510 --> 01:46.430
in order to authenticate this request.

01:46.470 --> 01:48.390
So I'm going to go ahead and click on allow.

01:48.950 --> 01:54.350
And we're going to go ahead and copy and continue to GitHub.

01:55.310 --> 01:57.150
This will open up a browser window.

01:57.590 --> 02:01.150
Click here on continue selecting the account that you have.

02:02.830 --> 02:07.660
And the next step involves pasting the code that you have already copied from cursor.

02:07.900 --> 02:13.060
So this is just about pasting the information there and clicking on continue.

02:13.700 --> 02:17.620
And now we're going to authorize Visual Studio Code to do these changes.

02:17.620 --> 02:19.860
Remember cursor is based on Visual Studio Code.

02:19.860 --> 02:25.740
So this is why we're going to see here that this is identifying itself as Visual Studio Code.

02:25.740 --> 02:27.740
So I'm going to click here on authorize.

02:29.220 --> 02:30.860
So now we are all set.

02:30.900 --> 02:32.860
Let's go back to cursor.

02:34.020 --> 02:39.260
So what we can see here now is a success message saying that the changes have been pushed to the main

02:39.260 --> 02:42.620
branch and to this specific repository.

02:42.900 --> 02:49.380
So anytime we want to push changes that we have committed locally, we can just tell cursor to do that

02:49.380 --> 02:50.060
for us.

02:50.300 --> 02:56.220
And if we're taking a look inside our repository we're refreshing this repository called flashcards.

02:56.420 --> 03:01.220
We're going to see here all the files that we have as part of our project.

03:01.220 --> 03:02.860
So now we have an additional bucket.

03:02.900 --> 03:05.540
Our code is now integrated with GitHub.

03:05.540 --> 03:07.900
And this opens up many other possibilities.
