How to git svn tag just some folders?

71 Views Asked by At

I've a standard svn repo:

  • branches/
  • tags/
    • 0.1/
    • 0.2/
  • trunk/
    • devops/
    • code/

and i want to tag devops and code folders into tags/0.3 by git-svn. Use of git svn tag 0.3 instead creates a new tag with all the repo inside, including tags and branches. How can i exclude them?

1

There are 1 best solutions below

0
ulidtko On

Please see man git-svn.

For svn repos in the "standard layout" (which means, branches/ tags/ trunk/ like you have), you should pass --stdlayout/-s to git svn clone.

This will have the effect of mapping svn "branches" and "tags" to git branches; and svn trunk will become the master branch in git.

The expected working tree content in git repo for your example is this:

.
├── code
├── devops
└── .git