the repository, as you already have one locally. Just click the Create Reposi-
tory button, and bang —it's done.
Now you'll see instructions on what to do next.
First, copy and save the URL to your repository at the top. In this example,
that would be https://github.com/andyhunt/minecraft.git .
Since you already have a local repository, follow the instructions at the bottom
for “Push an existing repository from the command line.” Mine looks like this:
$ git remote add origin https://github.com/andyhunt/minecraft.git
$ git push -u origin master
The first command sets up a remote named origin and associates it with the
given URL. Next, the push with the -u option sets the master branch to be
tracked to origin . Now whenever you reach a good stopping point, you can run
gitpush and all your code and changes will be safely saved in the cloud.
You (or anyone else if it's a public repository) can get a copy of all the code
and the history of the changes by using gitclone to clone a copy of the reposi-
tory into an empty directory:
$ mkdir newcopy
$ cd newcopy
$ git clone https://github.com/andyhunt/minecraft.git .