You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 earlierThis 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 👏