The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in command: "git push -u origin master"

7Buy All in One Shopping App
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2017

It is the first time I am making a push request and I am following the BitBucket's tutorial here it is:

 ScreenClip.png

I followed all the steps here is the error:

error: src refspec master does not match any.
error: failed to push some refs to '<some url>'

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
areatype
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2017

Adding this line:

git commit -m "initial commit"

Before this line:

git push origin master

 Solved the issue for me. 

0 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2017

What do you get from `git branch` ?

If you get "fatal: Not a git repository (or any of the parent directories): .git", but this is supposed to be a git repository, then you need to follow the "new project" guide instead of the "existing project" guide.

If you get "fatal: Not a git repository (or any of the parent directories): .git", but this is a Mercurial repository, then you'll need to make sure you add the repo URL to the [paths] section in .hg/hgrc, and then `hg push --new-branch` to create the appropriate structure on Bitbucket.

If you get a list of branches, but none is named "master", then you'll either need to push a different branch (`git push -u origin staging`, for example) or create a master branch (`git checkout -b master`) and then try pushing again.

If you get something else, then we can keep discussing here.

TAGS
AUG Leaders

Atlassian Community Events