Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-svn - #object# doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4706

Tags:

git

git-svn

on

git svn dcommit

it starts commiting and then I get this

A   spec/controllers/authenticated_system_spec.rb
A   spec/controllers/sessions_controller_spec.rb
A   spec/controllers/users_controller_spec.rb
A   spec/fixtures/users.yml
A   spec/helpers/users_helper_spec.rb
A   spec/models/user_spec.rb
A   vendor/plugins/haml/init.rb
A   vendor/plugins/restful_authentication
7235d9150e8beb80a819923a4c871ef4069c6759 doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4706
Failed to read object 7235d9150e8beb80a819923a4c871ef4069c6759 at /opt/local/libexec/git-core/git-svn line 570

any ideas how one goes about fixing this one?

tried inspecting with git fsck --full but git repo and all git commands seem to work fine just can't dcommit.

like image 223
user77339 Avatar asked May 05 '10 06:05

user77339


People also ask

What is the difference between SVN and Git?

The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.

Is SVN better than Git?

SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.

Can we use Git for SVN?

git svn is a git command that allows using git to interact with Subversion repositories. git svn is part of git, meaning that is NOT a plugin but actually bundled with your git installation. SourceTree also happens to support this command so you can use it with your usual workflow.

What is SVN for?

SVN stands for Subversion. So, SVN and Subversion are the same. SVN is used to manage and track changes to code and assets across projects.


2 Answers

Did you create submodules in your Git repo ?
This blog post seems to mention that as an issue.

As of Jan 2009 git-svn does NOT work with submodules.
There is no good way to map submodules to svn and the perl script that implements git-svn just bombs when doing git svn dcommit.

You need to go back and rewrite history.
You should be able to use git commit --amend.

$ git tag bad mywork~5
$ git checkout bad
$ # make changes here and update the index
$ git commit --amend
$ git rebase --onto HEAD bad mywork
like image 132
VonC Avatar answered Oct 10 '22 04:10

VonC


I had this same problem (where I had done a git clone and I'm using git svn). Here's the command I used to remove the submodule:

git filter-branch --index-filter \
'git rm --cached --ignore-unmatch path/to/the/formerly/misbehaving/module'

I found this wonderful solution on this blog

like image 20
caleb Avatar answered Oct 10 '22 02:10

caleb