git-svn isn't committing to branches, only trunk

落爺英雄遲暮 提交于 2019-12-05 06:15:54

Does the branch erik/comments exist in SVN already?

I work as follows:

git svn fetch #update any newly created branches
git checkout davec/new-feature # on remote branch, git may warn you
git checkout -b new-feature davec/new-feature # assumes this exists in SVN
# hack
# commit
git svn dcommit

I realize that git checkout -b local remote is a one-step version of what I do in two steps, however this seems to work.

Another option is to replace your config with your username, e.g.

branches = project/branches/erik/*:refs/remotes/*

And then

git checkout new-feature # remote branch
git checkout -b new-feature-branch # local
Erik Kastner

It looks like this did more-or-less what I'm looking for: Cloning a Non-Standard Svn Repository with Git-Svn

I still have an issue with some changes not showing up, but that's for another day. Thanks everyone!

VonC

You could try svn2git, and git2svn, as they do take into account non-standard SVN layouts.

They do use the --tags and --branches parameters of git svn, and even if you do not use the scripts I mentioned above, you can use those parameters to get the data in the right places in your svn repository.

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