Git: git push -> No refs in common and none specified; doing nothing

If you see the error message,

No refs in common and none specified; doing nothing
Perhaps you should specify a branch such as ‘master’.
fatal: The remote end hung up unexpectedly

It is probably because you cloned an empty repository and now trying to add new files and commit right?

To fix it so you can add do the following command:

 git push origin master

Not sure what the problem is but it could be because the remote repo and local repo have no files in common.

Reference:

thebuzzmedia

Advertisements
This entry was posted in Git, troubleshooting and tagged , , , . Bookmark the permalink.

2 Responses to Git: git push -> No refs in common and none specified; doing nothing

  1. Anupam says:

    i tried but it shows error: src refspec master does not match any.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s