echo "# repository_name" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/github_username/repository_name.git
git push -u origin main
I’ve noticed that if you try connecting to the SSH URL
git@github.com:github_username/repository_name.git
You will get a permission denied error but if you try connecting with the HTTPS URL it will work just fine.
I’m sure there’s an additional step if you’d like to use the SSH URL but at the moment I don’t know it.
If you do, please feel free to add it to the comments below.
Have any questions or comments? Write them below!