Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6802487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:13:45+00:00 2026-05-26T19:13:45+00:00

I was trying to deploy my source code onto Github. Then, I first added

  • 0

I was trying to deploy my source code onto Github.
Then, I first added the github source to remote source as follows:

$ git remote add origin git@github.com:user_name/foo_bar.git*

Then, I tried to run “git push” command to upload my source code onto my remote github account as below.

$ git push

Enter passphrase for key '/c/Users/mylaptop/.ssh/id_rsa':
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
error: failed to push some refs to 'git@github.com:user_name/foo_bar.git'

As I learned from railstutorial.org, I know if I use “git push” for the first time, it will return an error expecting me to specify ‘origin master’ parameters. But for the next and later times, I can only fire up “git push”, it will work gracefully for me. What is the reason for that? as I thought the command by default always refers to the branch ‘master’.

Any clear explanation would be really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:13:45+00:00Added an answer on May 26, 2026 at 7:13 pm

    The first time you do git push, there is no remote branch called master on origin.

    After the branch exists, you can use git push and it will link to the remote branch with the same name of the branch you are currently on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to deploy to a google code mvn repository which requires username/password
I'm trying to run the following Web Deploy command: msdeploy.exe -verb:dump -source:dirPath=C:\Deploy,wmsvc=localhost,username=<user>,password=<pass> I have
I'm trying to deploy a couple of jar files in a code module for
I am trying to deploy a war to a remote tomcat server from maven,
Hi I am trying to deploy an application using webstart. I have a requirement
I'm trying to deploy elmah . For inexplicable reasons, I'm getting an error: .axd
I'm trying to deploy to a slicehost slice using this config/deploy/production.rb file. I'm clueless
i am trying to deploy simple asp.net mvc frameworkd application in may shared hosting
I'm trying to deploy an application on Azure but I'm facing some problems. on
I'm trying to deploy a Sinatra app to Dreamhost and it says the following:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.