Cloning the remote repository to writers' computers

Each writer's computer stores their own locally cloned copy of the Git repository. This allows each writer to change and update a local copy of the project's source files, and then push those changes to the remote repository for sharing with the entire team.

To clone the project repository to a writer's computer

  1. In a Web browser, navigate to your project's repository page on GitHub. (That is, after connecting to GitHub, click Your repositories on your profile menu, and then click the appropriate repository.)
  2. In the Code drop-down list, click SSH, and then copy the URL that displays for your repository. This is the URL that you can use to access the repository from local writers' machines.
  3. On the writer's computer, navigate to the directory in which you want to store your local Git repository (this is where you'll store and update your project's source files).
  4. Right-click the directory, and then click Git Bash Here on the shortcut menu.
  5. At the command prompt, enter the following command to clone the remote repository, substituting in the URL of your repository that you copied in step 2:

git clone Repository_URL

  1. Because this is your first time connecting to the GitHub repository, an authenticity warning appears. Enter the word yes, and then press Enter to continue connecting to the repository.
  2. Next you are prompted for the passphrase you set up when creating your SSH keys. Enter the appropriate passphrase, and then press Enter to authenticate your account.

Git clones the remote repository to a child folder in the current directory; the new folder has the same name as the repository that you defined on GitHub.

  1. To verify the repository clone, list the contents of the current directory by entering the command ls (which is an abbreviation for list).
  2. Change to the repository directory by entering the following command and substituting in the name of your repository:

cd "Repository_name"

Tip   Re-entering the command ls now lists the contents of the repository's root folder. For a new repository, the contents consist only of the README.md file that you initialized when creating the repository.

  1. Configure the user name and email address to use when making updates to this repository by entering the following commands, substituting in the appropriate name and email address:

git config user.name "your_username"

git config user.email your_email_address

Repeat this procedure to clone the remote repository to each writer's computer. You are now ready to configure your Git repository to exclude specific files from version control.