Skip to content

Latest commit

 

History

History
36 lines (34 loc) · 1.43 KB

README.md

File metadata and controls

36 lines (34 loc) · 1.43 KB

This is my second repository as a full stack developer


Here I am self learning how to push an entirely new repo to GitHub


Step 1: Initiate Git in Parent Directory

Here are the instructions and codes I used to get it right:

First create a parent directory with a unique name that

will serve as your repository name. Then run this command

git init

NB:* Ony run this if you have not initiated git in this directory earlier This parent directory can contain as many sub-directories and files as your project requires

Step 2: Create a url on GitHub

Next go to GitHub and create an empty repository bearing the same name

as the parent directory you earlier created in your local computer.

Remember to add a brief description, then copy the url.

Step 3: Push New Repository to GitHub

From your terminal or code editor in your local computer run the following commands:

git add .
git commit -m "brief description of the commit or repo"
git remote add <nameofrepo> <repo url>
git push <nameofrepo>
Repo name must be consistent

_NB:* For this to work you must have pushed a repo before that means,

your local computer has been configured for Git. Follow this Link to learn how to configure your local machine and push your first git repository._

Hurray! 🎉🎊you just created a new repo on GitHub from your local computer 👏