I am unable to push to git master, even master branch is there. I have tried git push -u origin master
.
git --version
git version 2.32.0.windows.2
The commands executed .
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin http://url
git push -u origin main **//master is not working**
main branch is working
I have created a remote repository say git_example and then in the same name created a local repository(git_example) and tried to push it to remote.
D:\WORKSPACE\REACT\ems-backend-springboot>git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/subhashisz/ems-backend-boot.git'
D:\WORKSPACE\REACT\ems-backend-springboot>git push -u origin main
Enumerating objects: 67, done.
Counting objects: 100% (67/67), done.
Delta compression using up to 4 threads
Compressing objects: 100% (54/54), done.
Writing objects: 100% (67/67), 68.39 KiB | 1.27 MiB/s, done.
Total 67 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), done.
remote:
remote: Create a pull request for 'main' on GitHub by visiting:
remote: https://github.com/subhashisz/ems-backend-boot/pull/new/main
remote:
To https://github.com/subhashisz/ems-backend-boot.git
* [new branch] main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.