I am 开发者_开发技巧using git version 1.7.2.3 and I have the following situation:
Clone git repo from svn
|
*
* (<= commits to master & corresponding commit to svn)
*
*
|
master (points to svn HEAD)
|
|___ my-branch (no equivalent svn branch)
|
*
* (multiple commits to this branch)
*
*
|
(Current head of my-branch)
I would like to know how to push the "Current head of my-branch
" branch in git on to svn (where it doesn't exist yet).
I would advise to just check out the subversion repository again this time with the previously omitted -s flag. First create a patch on your already set up git repo:
$ git checkout my-branch
$ git format-patch master --stdout > my_branch.patch
Then apply the patch (git apply) on your newly created git repository which is aware of the tags and branches directory of subversion. For that git svn branch
will do the job.
精彩评论