Once I type this at the command prompt and hit the return,
it's going to set up my git repository.
Sometimes it may ask you to type in your credentials including
your password on your Bitbucket account so you may have to do that.
I had already done that previously,
so that's why it didn't ask me again for the password.
But once I type that in,
then the contents of my local Git repository will be pushed to the server side.
So now the data on my local Git repository is now matched on the server side.
So let's go to Bitbucket to see the status of my online Git repository now.
Going to my Bitbucket and then reviewing the online Git repository,
you will see that there has
been the master branch that has been pushed to my online Git repository.
I can then examine the source by looking at
the source here and then you can see that I have the index.html file,
which is exactly the same as what I have in
my local Git repository and examine the radius commits also,
so I can look at the state in the second commit and the first commit.
So you can now see that all this information has been uploaded to
the online repository including the history of all the commits.
Then going back there,
you can see more details about all the commits that have been sent to the server side.
I can examine each of those commits in a bit more detail and then going back to
the source I can look at more details at the source like that there.
That has now set up my local Git repository to be mirrored in the, Bitbucket.
The procedure is pretty much similar even on GitHub.
Let me set up an online Github repository.
Now obviously you have to remember that your local repository can
only be matched to one online Git repository.
I will only go through setting up the repository on
Github and you will notice that the same kind of commands would
be required if you want to set up
your local repository to be mirrored on a repository on Github.
On Github, if you log into
your account you would see something like this in your home page.
You can go to the right hand side where there's a plus sign and then
click on that to create a new repository or just click on
this button here to say new repository and then when that comes up
I can simply say git-test and then,
again as a reminder,
please make that a private repository.
Most of these providers allow you to now store
private repositories online so why make them public,
unless you really want to share it with other people.
So I would strongly urge you to keep your repositories
private for the moment unless if you're working with a team.
I should remind you that at this moment Github supports private repositories only
for those subscribers who pay for their Github account.
So it is not available for subscribers who are using their free account.
So simply click on private and then
create repository and that will create a repository and then you would
see that GitHub also gives me a bunch of commands here on how to set
up the repository so for creating a new repository on the command line.
The commands that we actually had done earlier are to push
an existing repository the same two kinds of commands that have to be issued.
That basically sets up your Github repository to mirror your local repository.
Since I have already linked my repository to Bitbucket,
I'm not going to use my Github repository for that purpose.