git svn - <file> was not found in commit <hash>
In the middle of pulling down a (rather large) svn repo with git-svn, I encountered the following error message (generic info substituted for real info):
Found possible branch point: svn://server/project/trunk/dir => svn://server/project/branches/branchname, <revision> Initializing parent: refs/remotes/branchname@<revision> project/trunk/dir/file was not found in commit <hash> (r<revision>)
I have read in other posts that it is possible to "un-fetch" this info through some tinkering. However, I would rather not lose the history and go forward as painlessly as possible.
How can I get git-svn fetch to continue?
This probably means that you are receiving a new svn revision which modifies a file which (for some reason) does not exist in your git commit equivalent of the parent svn revision. One very easy way to cause this is to be inconsistent with --ignore-paths (originally there was no way to configure those and they had to be entered on every git-svn command line that might fetch). Another way is for someone on the svn server end to change repository permissions in such a way that a whole subtree of files suddenly appears (from your perspective) that your git repository has no history for.
The easiest way to get past this immediate problem and continue git-svn fetch is to use --ignore-paths (or better the svn-remote.svn.ignore-paths config entry) to ignore the problem part of the tree. You can get away with the command line argument to pass a single revision and you won't hit the problem again until someone modifies it on the svn side.
If you want to recover without --ignore-paths then you will need to fix the parent revision so that it includes the file being modified. I wrote git-svn reset specifically to do the "un-fetch" you refer to with less tinkering. It can reset your svn remote back to where the file was really created so you can integrate it into your history. This won't wipe out your working copies, but you will need to reparent any working branches on this new history.