4
I’m going to create a very basic repository in GitHub and then establish a secure shell (SSH) link to it from the Git Bash application on my local machine. This will allow me to securely create a local copy of the repository on my machine, in Git terminology, this is called cloning (see § 2.9.4 and § 5.3).
Let’s create a GitHub repository. In my case I’m going to call it lab-1st-repo.
Go to the GitHub site and log in to the account you created earlier. This will take you to your newsfeed page. Mine still looks like this:
You can always reach this page by clicking the Octocat icon at the top left, this:
The first thing to do is create a new repository to hold our example project. I’m going to call it:
lab-1st-repo†1
To do this, click the button (highlighted below).
This will open the Create new repository page. I’m going to select the following options (Table 4.1 and Figure 4.11):
| PROPERTY | VALUE | |
|---|---|---|
| Repository name | lab-1st-rep | |
| Description | A first repository to demonstrate SSH connections | |
| Public/private | Public | |
| Initialise with README | Ticked (selected) | |
| Add .gitignore | None | |
| Add a license | None | |
| Table 4.1 lab-1st-repo settings | ||
Click and it will automatically open the repository page:
And that’s it; we’ve created a remote repository in GitHub.
It’s got just one file: README.md.
| †1 | Reverting back to my schooldays here, lab: short for laboravi in exemplum: “A worked example”—a disproportionate amount of my childhood was spent learning Latin | ||
| Repository names have to be unique, but only within your profile; two different profiles can have repositories with the same name. | |||