2

I know there are other questions on here about this issue, but this case is different because it's not caused by an empty repo folder or anything, and I've been pushing changes to this same repo using GitHub desktop for some time. After I type my changes into the summary window, I hit Commit to Master (branch is already set to master, like always). But I get the unborn head issue, along with the alert that my repo's name is too long. Again, this has never happened, and the name has never been an issue previously. Here's a screenshot for reference:
unborn head alert

Does anyone know what might be causing this?

2 Answers 2

1

The error is due to a file in "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/VisualStudio/15.0_8067392e/VTC/" having a name that is too long. The filename looks like it is generated by a tool, not written by you. In fact it looks like the whole "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/" directory is probably not code that you are working on yourself.

With version control, it is best to ignore any files and folders that are generated somehow, such as this "Microsoft" folder. With git, you can do that in your .gitignore file with the following line, assuming that "Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/" is your project root:

AppData/Local/Microsoft

In fact, if "AppData" contains only generated files, then you can even ignore just that.

1
  • Thanks, Billy! I'm going to try .gitignore and update soon on whether that solved it. Dec 3, 2018 at 18:00
0

I was using Sublime Text ver 3.2.1 working on a fresh copy of laravel in wamp. I had this issue of 'cannot publish unborn head' when using GitHub Desktop to publish for the first time. Solved by typing something in the title under Summary. As an aside, I included .editorconfig in my gitignore file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.