Treating my repository as a SVN repo, I get:
svn co http://myrepo/foo/trunk foo ... foo/ bar/ baz/ -> http://myrepo/baz/trunk
Treating it as a Git repo, I get:
git svn clone http://myrepo/foo --trunk=trunk --branches=branches --tags=tags ... foo/ bar/
I can clone baz to my local machine elsewhere and add a symlink, but that's just a hack. Is there a way to have git svn rebase
automatically pull in those changes when it updates everything else, just like svn up
does?
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
Many people prefer Git for version control for a few reasons: It's faster to commit. Because you commit to the central repository more often in SVN, network traffic slows everyone down. Whereas with Git, you're working mostly on your local repository and only committing to the central repository every so often.
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
The best means of integrating svn externals with git-svn that I've seen is this script, which clones your externals into a .git_externals/ directory and creates the symlinks and exclude files you need. I find this a simple and direct solution. YMMV.
Here is an older overview of other options for dealing with svn externals with git-svn. To me they look a little over-complicated and liable to break under subsequent Git use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With