Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

error: src refspec master does not match any

#Try git show-ref to see what refs you have. Is there a refs/heads/master?
#Due to the recent "Replacing master with main in GitHub" action, 
#you may notice that there is a refs/heads/main. As a result, 
#the following command may change 
#from ---> git push origin HEAD:master
#to   ---> git push origin HEAD:main

#You can try 
git push origin HEAD:master 
#as a more local-reference-independent solution. This explicitly states
#that you want to push the local ref HEAD to the remote ref master 
#(see the git-push refspec documentation).
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #src #refspec #master #match
ADD COMMENT
Topic
Name
7+1 =