"Cannot publish, unborn head" error message - github

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:
Does anyone know what might be causing this?

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.

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.

Related

File shows up in the list of files to commit in GitHub for Windows whereas it is present in .gitignore?

I use GitHub for Windows. How comes dstc1/dstc_scripts_src/score.csv shows up in the list of files to commit whereas it is present in .gitignore?
Looks like the .csv was accidentally committed to the repo, so it showed up despite the .gitignore rules.
If a file is in the repo then it will show up regardless of what .gitignore says about it -- it's a behavior listed in the docs, you can check out the Notes section as well for a few details.
Here's a similar issue with steps on how to get out of it.

Github windows: Commit failed: Failed to create a new commit

I have: http://windows.github.com/
My current project has around 20k files, around 150MB (and not speaking about how slow it is and I cannot do a thing now) it doesn't even let me commit! I get this error: Commit failed: Failed to create a new commit.
That seems that nobody is having.
I've already deleted the folder and cloned again, no escape. What to do?
If I choose to open shell, all this *** crashes!
Edit:
Since the problem I've switched to Git Extensions and I didn't look back!
thanks for your answers
This happened to me. Try opening up PowerShell and manually committing each file using the "git add [file name]" command. To see which files have been added, enter "git status" into the command line. The green files have been added, the red ones have not been added.
Once you've added them all, type "git commit." Then go back to Github for Windows and sync it up.
I'm not sure what causes this issue, but once I followed the above steps, Github went back to its normal, awesome behavior.
I had this problem too after an unexpected crash. I couldn't fix using the 'Open Shell' option as suggested. I had to open the Windows CLI (Start -> run -> cmd) and delete the index.lock file in my GitHub folder:
cd \Users\myUser\my\local\github\repo
cd .git
del index.lock
Then when I went back to the GitHub app, it committed successfully.
Note that for some people, according to comments, the file to delete doesn't have the .lock extension, so the delete command could also be del index.
Im using Githug for Windows (7) and faced the same problem. While using PowerShell I realized that I didn't fill Full Name and email address in tools > options. Look like a beginner mistake (and I am!).
hope it helps!
just try to commit a few from your updates. 5 for example. and then make another commit with all other updates.
I am using windows client and getting the same error. Then suddenly I realized that my local db in app_data was opened on the SQL management. It just simply can't commit the some files to github if they are opened or using at the other programs.
Just disconnected management studio closed it and just simply committed.
This may be your case also. Check your files out!
So guys this is the full steps I had to take in order to fix the problem...
1) Using Process Explorer (you can download it form here http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) I searched for any process referencing ".git\index" and then I killed it.
2)Then using Git Shell (Windows Power Shell) I went into the repository which was giving me such difficulty and then furthermore went into its .git folder. (cd .\your_respository_name\.git). I then removed the index.lock file in that directory (rm -r index.lock).
3)Then from within that same directory I ran git reset HEAD.
4)Then I manually committed each file using the "git add [file_name]" comand. (You can check that they were added successfully if when you run git status, the files are green.
5)Next run git commit if your files are added correctly.
6)Finally go back to github for windows and sync everything up and it should hopefully work and resolve the problem.
This issue seems to be a bug in the github client - I get it "all the time" on the machine on which i only installed the github client.
I Never saw it on the git + github PC (I have not used it for a few days now).
Doing the "git add ." and then "git commit" worked for me also on the shell - but that is the thing the GUI should be doing not me - otherwise I can just stick to the git shell client.
Had the same problem, couldn't commit or sync using the windows GUI, but I could commit the changes through the shell. Once I'd added the changes through the shell the windows GUI started to sync normally. Hopefully it's a one off.
I had an interesting issue - even though I had an excel file open called "Combined - ForImportv4.xlsm", Git UI had no problem checking that in but it gave the error in the OP's subject for the backup file "~$Combined - ForImportv4.xlsm" so I discarded that change and all went through.
PS: As for why i'm checking an Excel file into Git ... just don't got there :)...
I had this issue with the git windows desktop commit tool. I was getting this often and I figured out that Visual Studios was locking the files. To get around this issue I simply closed visual studio and the commit / sync worked fine.
I googled failed to create repository and ended up here.
My problem was that the description for my new repo was too long. There is a charlimit for the description, but GitHub tried to push it anyway and failed.
I just had the same problem, tried some of the suggestions on this post but none worked so what i did was, on the GiTHub client i went to tools -> settings and then click on the section where it says add/create default ignored files. Then hit Update and try to commit again through the client.
It happend to me when my project was opened in an IDE (Netbeans in my case), make sure non of the files you're about to commit isn't open in some program.
I checked the log file at C:\Users{user}\AppData\Local\GitHub\TheLog.txt and found this error:
LibGit2Sharp.LibGit2SharpException:
Could not open 'SomePath\SomeProject.opensdf':
The process cannot access the file because it is being used by another process.
I closed Visual Studio and the commit was then created successfully.
n.b. I removed actual file path in the above error.
If you are new user make sure that you have confirmed your e-mail. Had same problem and confirmation fixed it!
You can manually navigate to index.lock which is found inside the hidden .git folder of your repository location. Once you delete index.lock you will be able to commit as per usual.
The easiest way to navigate to the folder will be to click on the folder breadcrumbs inside windows explorer and add \.git and press enter.
Just delete 'index.lock' in the '/.git/' directory. Solved the problem for me instantly.
I had this happen to me and this is the easiest way to fix it:
Make a copy of your local folder that has the repo and remove the .git folder form it.
Delete the original repo folder with files.
Re-clone the repo from GitHub with the Windows client.
Delete all of the files that get cloned except for the .git folder.
Copy all files from the copied folder into the new clone folder.
Add in your commit notes and the commit should work this time.
I had the same problem and I fixed it by renaming one of the file because its name was too long. This fixed the problem.
Here is error message from git shell:
fatal: unable to stat 'plugins/com.napolitano.cordova.plugin.intent/example/app/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$OnlineEventsBridgeModeDelegate.class': Filename too long
I REBOOTED my Windows 7 machine and tried again - IT WORKED!
I had the "Commit failed: Failed to create a new commit" and tried to delete the index or index.lock file via windows command prompt and that didn't work. I deleted it via windows explorer, that didn't work.
I tried to check credentials like another reply in this list said, but couldn't figure it out and the credentials seemed 'ok.' So - I rebooted. Viola.
I'm not sure this will help anyone, I'm not all that great w/ this stuff, but trying.
I deleted ".git" in children directory and the problem was resolved.
It happened to me once ,I had a empty repository inside of the repository that I cloned.
It was a silly mistake though but could happen .

SVN - ignoring files already in repository

I have a configuration file in my project which needs to be in the repository (so new developers get it when they checkout the project). Each developer might change some values in the file locally - these changes should not be committed and I don't want them showing in the synchronization menu (I'm using eclipse and subversive if it matters).
Note that I can't just set the svn:ignore property since it only works on files that aren't under version control - but I do want to keep a base version of the file in the repository. How can I avoid the file showing in synchronization without deleting it from repository?
EDIT: A better description - what I actually need is to be able to set a "read-only" property on the config file, so it can't be changed in the repository as long as the property is on. Do you know anything like this?
Thanks
I do this by having a base version of the file checked-in as foo.base, and svn lock this so that it's read-only on checkout. Then have each developer copy this file to their own personal foo file, which is ignored by svn-ignore.
You can't ignore files which are already under version control. The only way to ignore such files is first delete those files do a commit and after that change the svn:ignore property and do a second commit.
If you like to have a kind of Base-Version use a template which has a different name.
You can version template under different name
OR
Read this answer
once u check out, u can lock it, and once it is locked, others will not be able to commit(make changes to svn) that file. see image below
My solution is that a compile time script creates a copy from the original template file if it does not exist. This copy can be put on the ignore list. I feel that locking a file for this purpose abuses the locking feature (it was not created for this).

Mercurial: Can you track changes across a file that has been renamed to another tracked file?

I know that you can track changes to renamed files from a repo to it's clone. However, I seem to have an issue when I rename a file to a file name that is already being tracked. In essence, I want to copy over a tracked file.
Files in original repo:
application.txt
special.txt
Then clone the repo, delete application.txt and rename special.txt to be application.txt
I would expect that the next time I made changes to special.txt in the original repo, the changes would carry over to application.txt. However, it doesn't. I get this message
local changed special.txt which remote deleted
use (c)hanged version or (d)eleted?
Trying this same thing out in Git seems to have the same results. Renaming a file to a brand new name has no issues while trying to rename a file that has already been 'taken' causes conflicts. Is there any way around this?
I wouldn't really call this a bug, as you have for all purposes just changed the contents of a file that mercurial is already tracking. Mercurial tracks files by file name and extension, and you could make the case that this is no different than just replacing the entire contents of the file.
I just had this problem in a real world project with Mercurial. GIT is also seeing bogus conflicts (special.txt deleted and updated).
Bazaar has proper rename support and it merges this case correctly (changes to special.txt are carried over and application.txt get updated as expected).
The problem with Bazaar though (at least for me) is that it lacks IntelliJ support. There are 2 plugins, the most recent has not been updated for 3 years, and last time i tried it was unusable with recent IntelliJ versions.
Since "bzr mv" and "bzr rename" need to be invoked by the IDE at the time of refactoring, the lack of support makes Bazaar unusable for me.
If you want IntelliJ support for this, vote here: http://youtrack.jetbrains.com/issue/IDEABKL-5344

svn: Item <folder> is out of date

[answer auto-selected by bounty system against my will]
I'm using subclipse, and always when delete a folder in Eclipse, and try to commit it, the following errors raise:
svn: Item <folder> is out of date
svn: DELETE of <folder>: 409 Conflict (http://myintranet)
Deleting and commiting via command line works fine, but what's wrong with doing it via subclipse? Is anyone more experiencing this problem?
(I experienced this problem in Ubuntu 9.10 and 10.04; last Eclipse version; and subclipse 1.4 - as the next versions of subclipse have much more bugs)
--updated: Its when I delete folders, not files
Isn't that addressed by the Subclipse FAQ?
Whenever you see "out of date" in an error message it means that the revision of the item in the repository is newer than the copy in your local working copy.
The solution is always going to be to run an update, so that your working copy is up to date with the repository, and then do the commit again (assuming that the update did not generate any conflicts).
For files, this is usually pretty easy to understand how and why this happens.
However, Subversion also versions folders, and it is usually with folders that this problem most often happens.
Subversion does not allow you to delete/rename a folder OR change its versioned properties, UNLESS the local copy of the folder is at the HEAD revision of the folder in the repository.
Your next question might be:
"OK, I can maybe understand that, but why is my folder out of date? I am the only person working in this repository."
That is a valid question, the answer lies in the way that Subversion works.
When you commit a change to a file, the revision of the file in your working copy is updated to that new revision when the commit completes, however the version of the parent folder(s) of that file is not updated.
This is because there may have been adds/deletes to other files in that folder and until you have run an update, the folder is not really at that new revision.
This is called "mixed revision working copies".
In summary, the answer is always to do an update so that the folder or file is updated to its HEAD revision.
About "Mixed Revision Working Copies":
One special kind of flexibility is the ability to have a working copy containing files and directories with a mix of different working revision numbers.
One of the fundamental rules of Subversion is that a “push” action does not cause a “pull,” nor vice versa.
Just because you're ready to submit new changes to the repository doesn't mean you're ready to receive changes from other people.
The fact is, every time you run svn commit your working copy ends up with some mixture of revisions.
The things you just committed are marked as having larger working revisions than everything else. After several commits (with no updates in between), your working copy will contain a whole mixture of revisions
(and that is why, I believe, you cannot reproduce your "out of date" message on subsequent commits with folder deleted: your update did solve the "mixed revision" state.)
Mixed revisions have limitations
You cannot commit the deletion of a file or directory that isn't fully up to date.
If a newer version of the item exists in the repository, your attempt to delete will be rejected to prevent you from accidentally destroying changes you've not yet seen.
i think if you UPDATE before that it should work.. it did work for me
There's a simple solution without installing some extra software. I also had this "problem" and what you can do is the following:
1) open the SVN Repository view
2) there go to the folder you want to get rid of and delete it
3) go back to the java view
4) update the folder in your project you actually deleted / update your project should also work
That solved the problem in my case, as updating only retrieved the files I deleted
Subclipse has many problems like this. It works 90% of time, and then it just DOES NOT work as it should! I am using subclipse, since it is very well integrated into eclipse, and when I have problem or some bigger moves needed in svn (like merging some branch) I use Tortoisse.
I had the thing with directory like you. Then I just run the TortoiseSVN like #luiscolorado suggests, and it helped. Tortoise is so great tool (it has many great features for diffing, applying patches, getting patches and so on.).
Today I had a problem when I have removed a file, and someone had changed the same file! Then subclipse shows conflict (up to this point everything is ok), so I wanted to revert! But then the revert button is missing (disappears when inconflict mode!) so I have to do merge, and merge does not work, throws some kind of error. I didn't bother to read (maybe I should read and file it as a bug to subclipse maintainers ;-(), I knew the tortoisse will work, and you know what, it worked. There was a REVERT option.
So #Tom Brito, try command line, try Tortoisse, and then you can look at the subclipse changelog and file a bug. I think that subclipse just forgets to show us some directory changes and updates (or it is designed not to do it?), but I may be wrong.
Tom,
You might want to try TortoiseSVN, and manually update the project workspace. Find the location of your project directory in your hard drive, and then try TortoiseSVN (or the command line if it's your preference) to do the update.
A frequent cause of this problem is to delete the directory without "informing" SVN. For instance, if you manually delete the directory using the operating system instead of using SVN, you will have this problem.
If you removed the directory before you installed the subversion plug-in, but the project already existed in the repository, you will experiment this problem. A solution, in this case, would be to recreate the directory, updating/committing, and then delete again the directory.
Good luck.
My solution to this was
Delete all items in folder
Commit to repository
Update folder to HEAD
Delete folder in Eclipse
Commit to repository
A bit cumbersome, maybe, but it always works
The only working way in same cases is via command line. The subclipse is still not perfect..