version control - git-svn: how do I create a new svn branch via git? -


i have git repository tracks svn repository. cloned using --stdlayout.

i created new local branch via git checkout -b foobar

now want branch end in …/branches/foobar in svn repository.

how go that?

(snipped lots of investigative text. see question history if care)

i know question has been answered while ago, after reading it, might adding examples of specific git svn branch command , relate typical workflow.

like kch answered, use git svn branch. here full example, (note -n dry-run test):

git svn branch -n  -m "branch authentication bug" auth_bug 

if goes well, server replies answer this:

copying https://scm-server.com/svn/portal/trunk @ r8914 https://scm-server.com/svn/portal/branches/auth_bug...

and without -n switch server adds like:

found possible branch point: https://scm-server.com/svn/portal/trunk => https://scm-server.com/portal/branches/auth_bug, 8914

found branch parent: (refs/remotes/auth_bug)

d731b1fa028d30d685fe260f5bb912cbf59e1971

following parent do_switch

successfully followed parent r8915 = 6ed10c57afcec62e9077fbeed74a326eaa4863b8

(refs/remotes/auth_bug)

the best part of it, can create local branch based on remote branch so:

git checkout -b local/auth_bug auth_bug 

which means "check out , create local branch named auth_bug , make follow remote branch (last parameter) auth_bug

test local branch works on remote branch using dcommit --dry-run (-n):

git svn dcommit -n 

and svn server should reply new branch name:

committing https://scm-server.com/svn/portal/branches/auth_bug ...


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -