-
Notifications
You must be signed in to change notification settings - Fork 4
Git hub repo from existing source
Humberto A Sanchez II edited this page Feb 8, 2023
·
3 revisions
Follow these simple steps to add an existing project to Github.
In Terminal, change the current working directory to your local project.
git init
Add the files in your new local repository. This stages them for the first commit.
git add .
or:
git add --all
git commit -m 'First commit'
Copy the remote repository URL field from your GitHub repository it is in in the right sidebar.
git remote add origin <_remote repository URL_>
Sets the new remote:
git remote -v
Ignore woke instructions from git to create a “main” branch and use the following command:
git push origin master
The above pushes the changes in your local repository up to the remote repository you specified as the origin