Connect to remote repo in Github

How to connect to remote repository in Github

Posted by Ervin Adams on November 29, 2022

Connect to remote repo in Github

How to connect to remote repository in Github

Posted by Ervin Adams on November 29, 2022

Here are the step to connect to a new remote respiratory and make your first commit.

Use a terminal to go to the root of your project. For example:

$ cd C:/Users/user/my_project

Then execute the following git commands below:

  • git init
  • git add README.md
  • git commit -m "first commit"
  • git branch -M main
  • git remote add origin https://github.com/yourrepo.git
  • git push -u origin main

In the second step you can do git add . to include all the files and folders from your local project.

Any question?
This field is required
Your question have been successfully submitted and will be reviewed before published
Please login to ask a question
Related
No related post
Related
No related post