git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin "_git repository link here_"
git push -u origin main
"main" is the usual branch name in Github repos. In some repos, it can be master or some other name
use the following command at that time
git push origin master