Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error rebaseing/updating a git-svn repository

Tags:

git

svn

git-svn

Hoping this is not a dup, I didn't find any concise information on how to update a git-svn repo. I used git svn clone to import an SVN repo into git. Then, after doing some commits, I wanted to rebase with regards to the original SVN repo.

C:\Work\osqa>git svn rebase
Migrating from a git-svn v1 layout...
Data from a previous version of git-svn exists, but
        .git/svn
        (required for this version (1.7.3.1.msysgit.0) of git-svn) does not exis
t.
Done migrating from a git-svn v1 layout
forum/views/readers.py: needs update
update-index --refresh: command returned error: 1

When I repeated the git svn rebase command a second time, I got just the tail of the last message:

C:\Work\osqa>git svn rebase
forum/views/readers.py: needs update
update-index --refresh: command returned error: 1

I'm not sure what the error message means. Can you help resolve it?

like image 459
ripper234 Avatar asked Mar 20 '11 09:03

ripper234


People also ask

How to use git with svn?

Use git-svn, it is really simple. First clone your repository with git svn clone then you can git svn dcommit your work or git svn rebase it on the latest changes. Make sure your history is always linear by always rebasing your local branches on master so that you can merge them with git merge --ff-only .

How to clone svn repository with git?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...

What is svn and git?

What is Git-SVN? The git-svn tool is an interface between a local Git repository and a remote SVN repository. Git-svn lets developers write code and create commits locally with Git, then push them up to a central SVN repository with svn commit-style behavior.

Was not found in commit git svn?

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.


3 Answers

If I recall correctly, that means that there are uncommitted changes to that file. What's the output of git status?

like image 55
Ilkka Avatar answered Sep 29 '22 14:09

Ilkka


If you are working on a Windows system and the output of git status returns "no changes added to commit", it may be a problem with the file attributes on FAT file system. Try executing git config core.fileMode false

Also the autocrlf setting could cause this.

like image 27
chiborg Avatar answered Sep 29 '22 16:09

chiborg


Looks like you have uncommitted file changes.

git status
# if you see pending changes, you can do multiple things
  1. Stash them and pull latest and revisit them.

    git stash git svn rebase git stash pop

  2. If changes are intended and u like to commit it.

    git add <file> git commit -m '<commit message>' git svn rebase

like image 24
Nagalakshmi Srirama Avatar answered Sep 29 '22 14:09

Nagalakshmi Srirama