{"thread":{"id":"15206","subject":"git-svn dcommit gone wrong and git-fsck","startedAt":"2008-08-26T16:37:36Z","lastAt":"2008-08-26T18:01:33Z","messageCount":3,"participants":["Bruno Harbulot","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"88591","messageId":"g91bgi$8cm$1@ger.gmane.org","threadId":"15206","inReplyTo":null,"subject":"git-svn dcommit gone wrong and git-fsck","fromName":"Bruno Harbulot","fromEmail":"bruno.harbulot@manchester.ac.uk","sentAt":"2008-08-26T16:37:36Z","receivedAt":"2008-08-26T16:37:36Z","isPatch":false,"sender":{"key":"bruno.harbulot@manchester.ac.uk","avatar":null},"body":"Hello,\n\nI had 11 consecutive commits in my local git repository that I was \ntrying to commit to an SVN repository, using \"git-svn dcommit\". The \nfirst 7 worked fine, as usual. However, when sending the 8th, I got a \n\"Bus error\" (on OSX -- I'm not sure what the actual cause was).\n\nA further \"git-svn dcommit\" produces this error.\nCannot dcommit with a dirty index.  Commit your changes first, or stash \nthem with `git stash'.\n  at /opt/local/bin/git-svn line 406\n\nIn addition, \"gitk --all\" no longer shows commits 8->11, but the current \nfiles seem to correspond to the last local commit.\nI've run git-fsck which shows 3 dangling trees and about a dozen \ndangling blobs.\n\nApologies if it's a FAQ, but I can't seem to find much documentation on \nhow this can be fixed (if it can). Is there a way to recover the missing \ncommits and re-attach them back on the branch? (I had pushed that branch \nup to the 10th commit into another repository, which could help.)\n\n\nThank you,\n\nBruno.\n"},{"id":"88611","messageId":"20080826173605.GA32301@atjola.homenet","threadId":"15206","inReplyTo":"g91bgi$8cm$1@ger.gmane.org","subject":"Re: git-svn dcommit gone wrong and git-fsck","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-08-26T17:36:05Z","receivedAt":"2008-08-26T17:36:05Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.08.26 17:37:36 +0100, Bruno Harbulot wrote:\n> Hello,\n>\n> I had 11 consecutive commits in my local git repository that I was  \n> trying to commit to an SVN repository, using \"git-svn dcommit\". The  \n> first 7 worked fine, as usual. However, when sending the 8th, I got a  \n> \"Bus error\" (on OSX -- I'm not sure what the actual cause was).\n>\n> A further \"git-svn dcommit\" produces this error.\n> Cannot dcommit with a dirty index.  Commit your changes first, or stash  \n> them with `git stash'.\n>  at /opt/local/bin/git-svn line 406\n\n1. git checkout $your_branch\n\n2. Look up the latest commit you had on your branch using \"git reflog\"\n   or \"git log -g\"\n\n3. git reset --hard $that_commit\n\n4. git svn rebase\n\n5. check that your history is sane\n\n6. git svn dcommit\n\nThat should do.\n\nBjörn\n"},{"id":"88619","messageId":"g91gdv$qgi$1@ger.gmane.org","threadId":"15206","inReplyTo":"20080826173605.GA32301@atjola.homenet","subject":"Re: git-svn dcommit gone wrong and git-fsck","fromName":"Bruno Harbulot","fromEmail":"bruno.harbulot@manchester.ac.uk","sentAt":"2008-08-26T18:01:33Z","receivedAt":"2008-08-26T18:01:33Z","isPatch":false,"sender":{"key":"bruno.harbulot@manchester.ac.uk","avatar":null},"body":"\n\nBjörn Steinbrink wrote:\n> On 2008.08.26 17:37:36 +0100, Bruno Harbulot wrote:\n>> Hello,\n>>\n>> I had 11 consecutive commits in my local git repository that I was  \n>> trying to commit to an SVN repository, using \"git-svn dcommit\". The  \n>> first 7 worked fine, as usual. However, when sending the 8th, I got a  \n>> \"Bus error\" (on OSX -- I'm not sure what the actual cause was).\n>>\n>> A further \"git-svn dcommit\" produces this error.\n>> Cannot dcommit with a dirty index.  Commit your changes first, or stash  \n>> them with `git stash'.\n>>  at /opt/local/bin/git-svn line 406\n> \n> 1. git checkout $your_branch\n> \n> 2. Look up the latest commit you had on your branch using \"git reflog\"\n>    or \"git log -g\"\n> \n> 3. git reset --hard $that_commit\n> \n> 4. git svn rebase\n> \n> 5. check that your history is sane\n> \n> 6. git svn dcommit\n> \n\nThanks a lot! It works.\n\n\nBest wishes,\n\nBruno.\n"}]}