git int
git add filename
git commit -m "first commit"
git branch -M main
git remote add origin githuburl
git push -u origin main
As it is stated in the Error message you have to "fetch first." This worked for me. Use the command:
git fetch origin master
Then follow these steps to merge:
git pull origin master
git add .
git commit -m 'your commit message'
git push origin master
here is the solution
- git init
- git add tt/
- git commit -m "first commit"
- git remote add origin https://github.com/Torykuzzaman/hello
- git pull
- git checkout -b master
git push origin master