“Cannot publish, unborn head” error message

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.

Leave a Comment