Whenever you first try to push to a
git repository, chances are you’ll get the next error message:
error: src refspec grasp doesn't match any. error: didn't push some refs to '[email protected] ... .git'
It’s because you haven’t dedicated your information!
The best way to Repair
src refspec essential doesn't match
git commit -m "preliminary commit" git push origin essential
The above code will commit your information which are staged, earlier than pushing them to your required department.
By default, we push our code to the
essential department above. Swap this out with one other department when you want.
The best way to Present all References in Git
If you wish to first see the references in git, then you should use the
git show-ref # abc123d5d8d40586df855302eca139ee2b75f789 refs/heads/essential # abc123d5d8d40586df855302eca139ee2b75f789 refs/remotes/origin/essential
As soon as you already know this, you possibly can push the code accordingly:
git push origin HEAD:<department>
You may additionally ask these questions
How do I repair error SRC Refspec grasp doesn’t match any?
First examine what git references:
How do I repair error SRC Refspec essential doesn’t match any error didn’t push some refs to?
git commit -m "<your message>" git push origin essential
How do I push to essential department GitHub?
git push -u origin essential
How do I power git to push?
git push -u origin <department> -f