I know similar questions have already been asked.
But, I believe my issue is due to a mistake I have previously made and therefore is different: let me explain.
if you add your remote repository by using git clone then follow the steps:-
git clone
then
git init
git add * *means add all files
git commit -m 'your commit'
git remote -v for check any branch run or not if not then nothing show then we add or fetch the repository.
"fetch first". You need to run git pull origin or git pull -r origin before a next push.
then
git remote add origin
git pull -r origin master
git push -u origin master```