ERROR:SRC Refspec Master does not match any solution appears on GitHub upload

Source: Internet
Author: User
Tags commit time interval using git git clone

1 error:src refspec Master does not match any
This problem, I have encountered before, this time again encountered just a long time interval, in order to prevent the future encounter similar problems, or This method is simply recorded here.

Of course, is through the search engine to find the answer, start with Google, I thought StackOverflow will be very authoritative, results in this did not find the right.

Http://stackoverflow.com/questions/21264738/error-src-refspec-master-does-not-match-any
Instead of Baidu input, to view the Chinese things to solve the problem.

Problem arises

Cause analysis

The cause of this error is that there are no files in the directory and an empty directory cannot be submitted.

Workaround

Touch Readme
git add readme 
git commit-m ' first commit '
git push Origin master

From: http://www.open-open.com/lib/view/open1366080269265.html
As a matter of fact

Git init

After this step, a folder named. Git is created, but it is hidden by default, and the hidden folder is displayed and you can see a folder like this.
GitHub Upload Project Method:
http://www.oschina.net/question/159132_86728
Install Git on your computer

The approximate process is:

1. Create a project on GitHub

2. Clone https://github.com/xxxxxxx/xxxxx.git to local using git clone

3. Edit the Project

4, git Add. (Add changes to staging area)

5, Git commit-m "submission instructions"

6. Git push origin master pushes local changes to the remote master branch.

This completes the push to the remote repository.

If you already have a file on GitHub remote, an error will occur. At this point, you should pull the first, namely:

Git pull Origin Master

And then proceed:

Git push Origin Master


Text/Continue to the Sky (Jane book author)
Original link: http://www.jianshu.com/p/8d26730386f3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.