开发者

Can I do 'git svn dcommit' from a SVN git clone which was created with --no-metadata?

I converted a SVN repository to git using

git svn clone --stdlayout --authors-file=authors.txt --no-metadata svn://svn.foo.com

For some reason, this gave me what looked like a bare repository. There was just a .git directory. In thise cloned repository, I wanted to get a checkout. Since git checkout didn't work, I ran

git reset --hard

Is this the correct way? It seems to work, but sounds scary. I then attempted to run

git svn rebase

So that the latest changes from the Subversion repository are pulled into my git clone. However, this didn't work. Instead开发者_高级运维, it yields the message

Unable to determine upstream SVN information from working tree history

Does anybody know why this is happening?


I believe this happens because I passed --no-metadata to git svn clone. This is what the git-svn(1) man page says about the 'no metadata' option:

This gets rid of the git-svn-id: lines at the end of every commit.

If you lose your .git/svn/git-svn/.rev_db file, git svn will not be able to rebuild it and you won't be able to fetch again, either. This is fine for one-shot imports.

I didn't read it like that, but apparently using --no-metadata made git svn not generate the git-svn/.rev_db file. I do have a .git/svn subdirectory, but no git-svn below that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜