Cannot Publish unborn Head Issue?


First let me make a confession, I am new to Git and GitHub. I am using the  GitHub Desktop to create a simple branch but keep getting the “Cannot publish unborn HEAD” under the Publisher branch section. Can someone please help and baby steps would be much appreciated. BTW, I did spend substantial amount of time searching on Google and other places but cannot figure it out. 



Hi @ahsanzaf,

Could you please describe your situation a bit more? Is this a repository that already exists on that you have cloned to your new machine or is this a new repository? Is the branch that you’re creating a new branch off of your master branch?

If this is your first repository, I highly recommend checking out the GitHub Hello World and Git Handbook guides in case that helps you figure out which stage of the process you’re getting stuck at.


I was having the same issue… :slight_smile: Solution is very easy.


The solution for me was simple.  You have to add some text in the “Summary” area (lower left hand corner of Github desktop GUI).  Then you can publish changes.


Adding text doesn’t work , when I click publish I get “Cannot Sync” You currently aren’t on any branch. Switch to a branch to sync.

If I switch to a branch the head is lost.

Hi @alancoler,

Are you having the exact same issue? Can you share a screenshot of what you’re seeing?


I am having the same issue as well.  I am unable to create a new branch using the desktop.

I am also new to Git/GitHub and I am using an Enterprise GitHub.  I created the repository on my Private/Personal Org.   

I will also note that I had a working repo in another ORG but when I tried to add this test repo it corrupted or confused the original ones name. 

The first Report should show P100/AIX and when I click Explore files it does open the AIX file folders


Let me know if you need other details @that-pat.


Hi @jayemn,

Are you getting the “Cannot Publish unborn HEAD” error message as well? I don’t see it in your screenshots, but I might be mistaken. If you’re not getting that exact error, it would be best that we start another thread in the forum as it is likely a different problem than the original poster’s error.


Thanks and sorry for the delay in responding. 

I forgot what the instructions were exactly but when a new repository is created and there are no files in it yet, it actually gives instructions on how to activate the master branch. I followed those and it worked for me. 

1 Like

I had the same issue, Had to close the splution in Visual Stodio First and then was able to publish.


I’m receiving this error, as well.  I am trying to create a local repo in a different folder than the name of the repo.  Here are the steps I take:

  1. I create the repo on GitHub Enterprise.
  2. I open Git Bash and navigate to the directory where I want to create the local repo, and type the following commands:
  3. I drag the local folder containing the .git folder into the GitHub desktop app
  4. git init
  5. git remote add origin [URLofREPO.git]
  6. git remote -v
  7. It shows the following error next to “Publish Branch”: “Cannot publish unborn HEAD”

Any help would be greatly appreciated. Thanks in advance!


I ran into this today where my Desktop (new install) was running on Windows 7 & my repo was on a drive mapped to a NAS ( formatted ext3 or 4).  When I went to do an initial sync on a new repository it looked like it was having trouble saving some extended file information to the git folder on the NAS.   I deleted all instances of the new repo, recreated it on a local drive & was fine after that.

2018-05-13T01:27:33.674Z - error: [ui] createRepository: initial commit failed at W:\www\git\Blocklists
GitError: warning: LF will be replaced by CRLF in .gitattributes.
The file will have its original line endings in your working directory.
error: unable to write sha1 filename .git/objects/df/e0770424b2a19faf507a501ebfc23be8f54e7b: Permission denied
error: .gitattributes: failed to insert into database
fatal: Unable to process path .gitattributes
1 Like

what was the solution?

1 Like

How?, show us to overcome

This worked for me, closed VS, Unity, and GitHub Desktop then re-opened GitHub Desktop, added a summary and Description, commit to Master and was able to Publish. Thanks!


Had the same error about 30 minutes ago and adding a summery fixed it

JayemN I had the same issue. For me it came because I had initialized and published the repo without making a commit, then a colleague made changes and I was unable to pull her changes.

The solution that worked for me was deleting the entire repo locally, then cloning what was on github into its place. 


Yep, that worked for me too!!

Thanks!! Worked for me


Worked for me too! So basic. Thanks