I can't upload my my folders and files to my repository on GitHub

Viewed 33

How to upload my folders and files to my repository on GitHub?

I used the following requests:

git remote add origin
git branch -M main
git push -u origin main

But it's not helping

1 Answers

Make sure you have added/committed your code first:

cd /path/to/my/local/repository
git switch main
git add .
git config --global user.name <your-GitHub-Username>
git config --global user.email <your-GitHub-User-Email>
git commit -m "First commit"
git push -u origin main
Related