重新设置/更新 git-svn 存储库时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5367734/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error rebaseing/updating a git-svn repository
提问by ripper234
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.
希望这不是重复,我没有找到任何关于如何更新 git-svn 存储库的简明信息。我使用 git svn clone 将一个 SVN repo 导入到 git 中。然后,在做了一些提交之后,我想根据原始 SVN 存储库进行重新设置。
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:
当我第二次重复 git svn rebase 命令时,我只得到最后一条消息的尾部:
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?
我不确定错误消息的含义。你能帮忙解决吗?
回答by Ilkka
If I recall correctly, that means that there are uncommitted changes to that file. What's the output of git status
?
如果我没记错的话,这意味着该文件有未提交的更改。的输出是git status
什么?
回答by chiborg
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
如果您在 Windows 系统上工作并且输出git status
返回“没有添加到提交的更改”,则可能是 FAT 文件系统上的文件属性有问题。尝试执行git config core.fileMode false
Also the autocrlf
setting could cause this.
另外,autocrlf
设置可能会导致此。
回答by Nagalakshmi Srirama
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
将它们藏起来并拉取最新的并重新访问它们。
git stash
git svn rebase
git stash pop
如果打算进行更改并且您喜欢提交它。
git add <file>
git commit -m '<commit message>'
git svn rebase