Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

heroku error: src refspec master does not match any.

git add .
git commit -m "Initial commit"
git push heroku HEAD:master
Comment

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).
Comment

error: src refspec master does not match any. git

# You are trying to add an empty repository, add something first, like a readme
touch README.md
git add README.md
git commit -m "Initial commit"
git push --set-upstream origin master
Comment

error: src refspec master does not match any.

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin "_git repository link here_"
git push -u origin main
Comment

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

So try `git push origin main`
Comment

error: src refspec master does not match any.

git config --global user.email "you@example.com"

git config --global user.name "Your Name"
Comment

error: src refspec master does not match any.

git push origin main
Comment

error: src refspec master does not match any

# find the right branch: master or main
# newer git repos start with main
git push origin main
# to switch head branch:
git branch -M main
Comment

error: src refspec master does not match any.

git init
git add . //to add everything
git commit -m ''
git remote -v
git push heroku master
Comment

heroku error: src refspec master does not match any

git push origin main
Comment

PREVIOUS NEXT
Code Example
Shell :: Redis::CommandError: MISCONF Redis is configured to save RDB snapshot 
Shell :: change owner of directory mac terminal 
Shell :: change branch name 
Shell :: git how to update branch from master 
Shell :: linux convert to sha256 
Shell :: run a command with sudo su 
Shell :: conda install cython 
Shell :: git diff files of different branches 
Shell :: list apt installed programs 
Shell :: command to create or change a password for a user 
Shell :: linux distros 
Shell :: scrcpy use on linux 
Shell :: npm TypeError [ERR_INVALID_ARG_TYPE]: 
Shell :: install spotify-web-api-js 
Shell :: git reset add 
Shell :: git add origin command 
Shell :: Git: push to create project 
Shell :: how to install homebrew on mac 
Shell :: amplify remove environment 
Shell :: surge flutter web 
Shell :: git create and checkout branch 
Shell :: adobe reader linux 
Shell :: bash data types 
Shell :: how to push changes to branch in git 
Shell :: Display lines containing the pattern “root” and 3 lines after them in the file /etc/passwd. 
Shell :: Count subdirectories within a directory 
Shell :: discard all changes 
Shell :: unzip linux 
Shell :: error: src refspec main does not match any error: failed to push some refs to 
Shell :: whereis 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =