in Technology by
What is mean by 'src refspec master does not match any when pushing commits in Git?

1 Answer

0 votes
by

mkdir repo && cd repo
git remote add origin /path/to/origin.git
git add .

Oops! Never committed!

git push -u origin master
error: src refspec master does not match any.

All I had to do was:

git commit -m "initial commit"
git push origin master

Success!

Related questions

0 votes
    Which type of remote URL does not require your user-name and password while for cloning or pushing? A. SSH url B. Https Url...
asked Dec 17, 2022 in Technology by JackTerrance
0 votes
    git reflog tracks the commits that are made and the commits that are discarded. A. True B. False...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    What is the Git command to view the last three commits in a line? A. git last 3 commits B. git log -–oneline -3 C. git show log -3 D. git log...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the Git command to view all the commits since 1st January 2017 ? A. show git log since Jan 1 2017 B. git log ... =”2017-01-01” C. git log D. None of the options...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    What is the Git command to view the last 3 commits in one line ? A. git show log -3 B. git last 3 commits C. git log D. git log -–oneline -3...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    How to delete unpublished Git commits and get rid of them permanently? A. git reset –hard B. git revert C. git reset –soft...
asked Dec 20, 2022 in Technology by JackTerrance
0 votes
    How to change the author and committer name and e-mail of multiple commits in Git?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    Explain How can we make Git use the editor of my choice for commits?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    I would prefer to write my commit messages in Vim, but it is opening them in Emacs. How do I configure Git ... for a single project. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I would like to know how to delete a commit. By delete, I mean it is as if I didn't make that commit, ... -hard HEAD. Is this correct? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    Does independence of the judiciary mean that the judiciary is not accountable to any one? Write your answer in not more than 100 words. Please answer the above question....
asked Aug 4, 2022 in Education by JackTerrance
0 votes
    What is mean by Scrum Master? What are the responsibilities of Scrum Master?...
asked Jul 18, 2021 in Education by JackTerrance
0 votes
    What do you mean by the Master production schedule (MSP)?...
asked Mar 15, 2021 by JackTerrance
0 votes
    When I use svn diff or git diff it shows lines like: @@ -1,5 +1,9 @@ What do they mean ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
...