barn

Create a Git and GitHub Repository—Study Guide

Note: Most of the links have been removed from this page.

To put your project up on GitHub, you'll need to create a repository for it to live in. You'll do that in a later unit.

A video of the following tutorial is available at link

Start a New Project (Repository) in Git

First, create a repository in your Git installation on your computer:

  1. Double-click the Git icon somewhere on your computer. (It's probably named Git Bash.)
  2. In Git on your computer, enter this command cd ~/Desktop. Let me know what it is on a Mac.
  3. To create a new repo, enter what will be its directory name mkdir david_repo1 (use any name you like).
  4. Change into that new directory, for example: cd david_repo1
  5. To create a new project in a rep, enter git init. You should see something like this:
    Initialized empty Git repository in C:/Users/hcexr/Dropbox/My PC (LAPTOP-V64CTP3M)/Desktop/david_repo1/.git/
    Notice that it creates a new folder on your desktop.
  6. In Git, enter touch readme.txt
  7. Enter the ls command to see that the file is there:
    alt text
  8. git add readme.txt to "stage" the file so that it can be "committed."
  9. To see what has been done, enter git status. You'll see some like this:
    alt text

Complete This Unit

To reassure your instructor that you have gotten through this unit successfully:

  1. Take a screen shot of your account on the Git installation on your computer.
  2. E-mail this or these to your instructor at admin@mcmassociates.io (click this link).

Return

Return to your bookmarked course main page.

Related Information

Create a Repo. From github.com

Setting up a repository . From Atlassian.com

Getting started with writing and formatting on GitHub

DevOps principles. This introduces you to the new buzzword of the day, DevOps.

Maintained by admin@mcmassociates.io.