Error rebaseing/updating a git-svn repository
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) d开发者_StackOverflowoes 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?
If I recall correctly, that means that there are uncommitted changes to that file. What's the output of git status
?
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.
Looks like you have uncommitted file changes.
git status
# if you see pending changes, you can do multiple things
Stash them and pull latest and revisit them.
git stash
git svn rebase
git stash pop
If changes are intended and u like to commit it.
git add <file>
git commit -m '<commit message>'
git svn rebase
精彩评论