0

Hi all—I want to preface this by saying I'm not a developer, but my company uses git for working collaboratively on text based reports (rather than, say, google docs). My understanding of the software is definitely limited, so forgive any forthcoming "dumb" questions.

I've gotten this error message quite regularly over the past month when I try to push commits from github desktop.

error: unable to push to unqualified destination: branch-name
The destination refspec neither matches an existing ref on the remote nor 
begins with refs/, and we are unable to guess a prefix based on the source ref. 
error: failed to push some commits to 'https://github.com/companyname/myrepo.git'

When I first encountered this, I read on another thread that it might be an issue of capitalization. I could publish a new branch online that had the "right" capitalization and it would push my commits fine then. Now, that's not working reliably. Importantly, I'm selecting the current branch on github desktop from the dropdown menu, so why does the capitalization not match what's been published online in the repo?

I'm at a loss and I have lost some work in the process which is super frustrating when no one else on my team is having this problem and I'm having to play catch up so regularly. Any advice is much appreciated.

Leo Correa
  • 19,131
  • 2
  • 53
  • 71
  • 1
    What are the steps you perform that cause this error? – Code-Apprentice Apr 09 '18 at 17:24
  • Check out https://stackoverflow.com/questions/28417845/pushing-a-large-github-repo-fails-with-unable-to-push-to-unqualified-destinatio to see if there is anything that will help you there. I think the answers assume that you are using the command-line instead of GitHub Desktop. – Code-Apprentice Apr 09 '18 at 17:28
  • @Code-Apprentice thanks for the advice—that thread is actually what pointed me toward the capitalization problem, but I still cannot reliably solve that problem given the desktop is pulling a different branch name than is online. My steps are (I think) simple—working in a markdown file, I commit my changes to the text, and then hit "push origin" and get that message. This doesn't happen every time or in every branch. There doesn't appear to be a pattern based on how the branches are named or size of commits. – Rachael Salisbury Apr 09 '18 at 18:51
  • I am not familiar with GitHub Desktop which is why I ask about exact steps. I use command-line and IDE integration. I am more than happy to help as much as I can by extrapolating on my experience with those tools. It will help a lot if you edit your question to include a step-by-step reproduction. Use screenshots if necessary to make it clear exactly what you do that causes the error. – Code-Apprentice Apr 09 '18 at 19:30

0 Answers0