How do I list and fetch remote branches after SVN to Git migration? [duplicate]

那年仲夏 提交于 2019-11-30 10:15:18

If this is intended to be a one-way conversion (never going back to svn) I would strongly suggest using svn2git as it greatly simplifies the whole thing. To do the conversion, you basically do

svn2git <svn repo url> --authors <author names & emails file>
git remote add origin <git bare repo url>
git push --all
git push --tags

... that's really all there is to it.

The only suspicious command I can find in your sequence is the

git config branch.master.remote origin

First, your first local repo (from the git svn fetch) should have branches, not remote branches.

Second, your server repo (which does have the right branches), should be able to be cloned with all its refs, meaning the second local repo should list all the remote branches.

Could you try the git svn fetch without the git config branch.master.remote origin?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!