$ git push -u origin main error: src refspec main does not match any error: failed to push some refs to 'https://gitlab.com/jay2tinku/my-new-project.git' If you get such error while performing any git operation. This means you have to check your default branch name. From last few git versions by default branch name is main instead of master . It never means that it will always be main/master . Normally at the time of installation we have to configure that but most of the time we ignore that and go with default options. Simple fix of this error is :- git push -u origin master or git push -u origin main Please have a look on below scenario for complete understanding $ mkdir my-new-project $ cd my-new-project $ git status $ git init $ cat > test.txt My first line!!! $ git status $ git remote add origin https://gitlab.com/jay2tinku/my-test-project.git $ git add . $ git status $ git commit . -m "Intial push commit" $ git push -u origin main error: src...
Hello! Welcome to my Technical blog. My Name is Rakesh Kumar and I’ve more than 7 years of experience in Linux and Open Source technologies. If you are looking for technical information about Linux(Server Hardening, Diagnostics & Troubleshooting etc), Ansible, OpenStack Cloud Solution, Containers(K8s/OCP), DevOps, Machine Learning and Nagios Event Monitoring tool.... you have come to the right place. "I believe Learning and earning shouldn't stop", This is my story!