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:
- Double-click the Git icon somewhere on your computer. (It's probably named Git Bash.)
- In Git on your computer, enter this command cd ~/Desktop. Let me know what it is on a Mac.
- To create a new repo, enter what will be its directory name mkdir david_repo1 (use any name you like).
- Change into that new directory, for example: cd david_repo1
- 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.
- In Git, enter touch readme.txt
- Enter the ls command to see that the file is there:
- git add readme.txt to "stage" the file so that it can be "committed."
- To see what has been done, enter git status. You'll see some like this:
Complete This Unit
To reassure your instructor that you have gotten through this unit successfully:
- Take a screen shot of your account on the Git installation on your computer.
- 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.