What does the –stdlayout do in git svn clone?

I just spotted this question about recovering from a clone done without –stdlayout. I didn’t find documentation of this flag – what does it do?

  • Git cherry pick and datamodel integrity
  • Git to TFS 2008 one way migration (with history)
  • Git clone failing on public key. Is there something I'm missing?
  • How to create a submodule with libgit2sharp
  • Git svn rebase fails
  • Prestashop Test/Production Server Best Practices
  • How can I push a new branch?
  • Easiest way to do “git grep” for multiple strings?
  • Create SSH keys for Apache user on CentOS
  • How do I use remote machine's SSH keys in ansible git module
  • Rename branches in git bare repository
  • Exclude directories from elastic beanstalk deploy
  • 2 Solutions collect form web for “What does the –stdlayout do in git svn clone?”

    Subversion doesn’t have any concept of branch or tag. Instead, those are typically simulated by simply copying the contents of the repository into a directory.

    In order for git svn to be able to recognize branches and tags and the main branch (“trunk”), you have to explicitly tell it where to find them, using the --tags (or -t), --branches (or -b) and --trunk (or -T) options.

    However, many Subversion repositories follow a standard convention, laid out in the Subversion book, of --trunk=/trunk --branches=/branches --tags=/tags. --stdlayout (or -s) encodes this convention, so that you don’t have to pass the same arguments every time you clone a Subversion repository.

    You can find this information in the git-svn(1) manual page, which you can access under Unix with man git-svn and in an operating system independent fashion via the builtin Git help system with git help svn. All of the Git man pages are also available on Kernel.Org and they are usually the first search result when you search for git-svn(1).

    --stdlayout (-s) tells git-svn that folders in /branches should be imported as branches, and that folders in /tags are snapshots of a project state and should be imported as tags. The master branch will be set to /trunk.

    It’s equivalent to --trunk=trunk --tags=tags --branches=branches

    Git Baby is a git and github fan, let's start git clone.